com.dlsc.flexgantt.model.gantt
Class LinearSearchTimelineObjectIterator<T extends ITimelineObject>
java.lang.Object
com.dlsc.flexgantt.model.gantt.LinearSearchTimelineObjectIterator<T>
- Type Parameters:
T
- the type of the timeline objects
- All Implemented Interfaces:
- java.util.Iterator<T>
public class LinearSearchTimelineObjectIterator<T extends ITimelineObject>
- extends java.lang.Object
- implements java.util.Iterator<T>
Instances of this class are used to iterate over the sorted list of timeline
objects returned by a timeline model. An iterator only returns those objects
that intersect with the time span passed to the constructor of the iterator.
- Since:
- 1.0
- Author:
- Dirk Lemmermann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearSearchTimelineObjectIterator
public LinearSearchTimelineObjectIterator(java.util.List<T> objectList,
ITimeSpan span,
boolean reverse)
- Constructs a new iterator object.
- Parameters:
objectList
- the sorted list of timeline objectListspan
- the time span to iterate overreverse
- determines the iteration direction (reverse = false = left to
right = earlier to later, reverse = true = right to left)
LinearSearchTimelineObjectIterator
public LinearSearchTimelineObjectIterator(java.util.List<T> objectList,
ITimeSpan span)
- Constructs a new iterator object.
- Parameters:
objectList
- the sorted list of timeline objectListspan
- the time span to iterate over
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<T extends ITimelineObject>
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<T extends ITimelineObject>
next
public T next()
- Specified by:
next
in interface java.util.Iterator<T extends ITimelineObject>