Package org.opennms.core.utils
Class AbstractTimeIntervalSequence<T extends TimeInterval>
- java.lang.Object
-
- org.opennms.core.utils.AbstractTimeIntervalSequence<T>
-
- Direct Known Subclasses:
OwnedIntervalSequence
,TimeIntervalSequence
public abstract class AbstractTimeIntervalSequence<T extends TimeInterval> extends Object
TimeIntervalSequence class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description AbstractTimeIntervalSequence()
Constructor for TimeIntervalSequence.AbstractTimeIntervalSequence(T interval)
Constructor for TimeIntervalSequence.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAll(Collection<T> intervals)
addAllvoid
addAll(AbstractTimeIntervalSequence<T> intervals)
addAllvoid
addInterval(T interval)
addIntervalvoid
bound(Date start, Date end)
boundvoid
bound(T interval)
boundprotected Collection<T>
combineIntervals(T currentInterval, T newInterval)
combineIntervalsprotected abstract T
createInterval(Date start, Date end)
createIntervalprotected abstract AbstractTimeIntervalSequence<T>
createTail(T interval)
createTailTimeInterval
getBounds()
getBoundsDate
getEnd()
getEndDate
getStart()
getStartIterator<T>
iterator()
iteratorvoid
removeAll(AbstractTimeIntervalSequence<T> intervals)
removeAllvoid
removeInterval(T removedInterval)
removeIntervalprotected Collection<T>
separateIntervals(T origInterval, T removedInterval)
separateIntervalsString
toString()
toString
-
-
-
Constructor Detail
-
AbstractTimeIntervalSequence
public AbstractTimeIntervalSequence()
Constructor for TimeIntervalSequence.
-
AbstractTimeIntervalSequence
public AbstractTimeIntervalSequence(T interval)
Constructor for TimeIntervalSequence.
- Parameters:
interval
- aTimeInterval
object.
-
-
Method Detail
-
addInterval
public void addInterval(T interval)
addInterval
- Parameters:
interval
- aTimeInterval
object.
-
combineIntervals
protected Collection<T> combineIntervals(T currentInterval, T newInterval)
combineIntervals
- Parameters:
currentInterval
- aTimeInterval
object.newInterval
- aTimeInterval
object.- Returns:
- a
Collection
object.
-
createInterval
protected abstract T createInterval(Date start, Date end)
createInterval
- Parameters:
start
- aDate
object.end
- aDate
object.- Returns:
- a
TimeInterval
object.
-
createTail
protected abstract AbstractTimeIntervalSequence<T> createTail(T interval)
createTail
- Parameters:
interval
- aTimeInterval
object.- Returns:
- a
AbstractTimeIntervalSequence
object.
-
removeInterval
public void removeInterval(T removedInterval)
removeInterval
- Parameters:
removedInterval
- aTimeInterval
object.
-
separateIntervals
protected Collection<T> separateIntervals(T origInterval, T removedInterval)
separateIntervals
- Parameters:
origInterval
- aTimeInterval
object.removedInterval
- aTimeInterval
object.- Returns:
- a
Collection
object.
-
bound
public void bound(T interval)
bound
- Parameters:
interval
- aTimeInterval
object.
-
getBounds
public TimeInterval getBounds()
getBounds
- Returns:
- a
TimeInterval
object.
-
addAll
public void addAll(AbstractTimeIntervalSequence<T> intervals)
addAll
- Parameters:
intervals
- aAbstractTimeIntervalSequence
object.
-
addAll
public void addAll(Collection<T> intervals)
addAll
- Parameters:
intervals
- aCollection
object.
-
removeAll
public void removeAll(AbstractTimeIntervalSequence<T> intervals)
removeAll
- Parameters:
intervals
- aAbstractTimeIntervalSequence
object.
-
-