com.levigo.util.base.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 to previous(E) and next(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:


Method Summary
 E next(E value)
          Given a sequencable value, produce the next value in the sequence such that value is now included in the sequence.
 E previous(E value)
          Given a sequencable value, produce the previous value in the sequence such that value is now included in the sequence.
 

Method Detail

previous

E previous(E value)
Given a sequencable value, produce the previous value in the sequence such that value 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

next

E next(E value)
Given a sequencable value, produce the next value in the sequence such that value is now included in the sequence.

Parameters:
value - a sequencable value
Returns:
the next value in the sequence such that value would be included within the bounds of the sequence


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.