net.sourceforge.nite.gui.textviewer
Interface TimeIntervalIterator


public interface TimeIntervalIterator

Utility to allow stateful interation across a timeline, testing, for each time visited, which objects are in context at that time.

Author:
judy

Method Summary
 java.util.Set getMatchingObjects()
          Get the set of Objects (as supplied to the underlying TimeIntervalMapper) which match the currently set time.
 double getTime()
          Get the time to which the iterator has been set using setTime(double).
 boolean hasObjectSetChanged()
          Tests whether the last call to setTime(double) caused the set of matching objects to change.
 void setTime(double time)
          Set the iterator to a specified time.
 void setTimes(double stime, double etime)
          Set the iterator to a specified span.
 

Method Detail

setTime

void setTime(double time)
Set the iterator to a specified time. This may result in the set of objects returned by getMatchingObjects() being changed; this can be tested with hasObjectSetChanged().

Parameters:
time - The time to which the iterator should seek.

setTimes

void setTimes(double stime,
              double etime)
Set the iterator to a specified span. This may result in the set of objects returned by getMatchingObjects() being changed; this can be tested with hasObjectSetChanged()??

Parameters:
time - The time to which the iterator should seek.

getTime

double getTime()
Get the time to which the iterator has been set using setTime(double).

Returns:
The time.

getMatchingObjects

java.util.Set getMatchingObjects()
Get the set of Objects (as supplied to the underlying TimeIntervalMapper) which match the currently set time.

Returns:
Set of matching objects.
Throws:
java.lang.IllegalStateException - if no time has been set.

hasObjectSetChanged

boolean hasObjectSetChanged()
Tests whether the last call to setTime(double) caused the set of matching objects to change.

Returns:
true iff the set has changed.