Package ca.odell.glazedlists
Interface SequenceList.Sequencer<E>
-
- Enclosing class:
- SequenceList<E>
public static interface SequenceList.Sequencer<E>
A Sequencer defines the logic required to calculate the previous and next sequence values given any value. It is important to note that the arguments passed toprevious(E)
andnext(E)
will not always be sequence values themselves. For example if a Sequencer is contains logic to produce a sequence of numbers evenly divisible by 2, it must handle returning the next and previous even number relative to any integer. So the Sequencer logic must produce:previous(5)
returns 4previous(6)
returns 4next(5)
returns 6next(4)
returns 6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
next(E value)
Given a sequencablevalue
, produce the next value in the sequence such thatvalue
is now included in the sequence.E
previous(E value)
Given a sequencablevalue
, produce the previous value in the sequence such thatvalue
is now included in the sequence.
-
-
-
Method Detail
-
previous
E previous(E value)
Given a sequencablevalue
, produce the previous value in the sequence such thatvalue
is now included in the sequence.- Parameters:
value
- a sequencable value- Returns:
- the previous value in the sequence such that
value
would be included within the bounds of the sequence
-
-