com.dlsc.flexgantt.model.gantt

## Class BinarySearchTimelineObjectIterator<T extends ITimelineObject>

- java.lang.Object
- - com.dlsc.flexgantt.model.gantt.BinarySearchTimelineObjectIterator<T>

- Type Parameters:
    `T` - the type of the timeline objects
  All Implemented Interfaces:
    Iterator<T>

      public class BinarySearchTimelineObjectIterator<T extends ITimelineObject>
      extends Object
      implements 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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinarySearchTimelineObjectIterator(List<T> objectList, ITimeSpan span)` Constructs a new iterator object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `T` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Constructor Detail

    - #### BinarySearchTimelineObjectIterator

          public BinarySearchTimelineObjectIterator(List<T> objectList,
                                                    ITimeSpan span)

      Constructs a new iterator object.
      Parameters:
        `objectList` - the sorted list of timeline objectList
        `span` - the time span to iterate over

  - ### Method Detail

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<T extends ITimelineObject>`

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<T extends ITimelineObject>`

    - #### next

          public T next()

      Specified by:
        `next` in interface `Iterator<T extends ITimelineObject>`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.