public class Sequence<E> extends TreeSet<E>
SequenceElementComparator.| Constructor and Description |
|---|
Sequence(SequenceElementComparator<E> comparator)
Creates a new
Sequence instance. |
| Modifier and Type | Method and Description |
|---|---|
SequenceElementComparator<E> |
comparator()
Returns this sequence's comparator.
|
E |
higher(E e)
Returns the next higher element in the sequence to the given element.
|
E |
lower(E e)
Returns the next lower element in the sequence to the given element.
|
E |
predecessor(E e)
Returns the immediate predecessor of the given element in this sequence
or
null if no predecessor exists. |
E |
successor(E e)
Returns the immediate successor of the given element in this sequence
or
null if no successor exists. |
add, addAll, ceiling, clear, clone, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, isEmpty, iterator, last, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSetequals, hashCode, removeAllcontainsAll, retainAll, toArray, toArray, toStringpublic Sequence(SequenceElementComparator<E> comparator)
Sequence instance.comparator - a strategy for comparing elements of this sequence.public E predecessor(E e)
null if no predecessor exists.e - an element which is compared to elements of this sequence.null.public E successor(E e)
null if no successor exists.e - an element which is compared to elements of this sequence.null.public SequenceElementComparator<E> comparator()
comparator in interface SortedSet<E>comparator in class TreeSet<E>public E higher(E e)
null is returned. Please note that this
method is provided for compatibility with Java 5 SE. On a Java 6 SE
platform the same method implemented by the TreeSet
class should be used for better performance.public E lower(E e)
null is returned. Please note that this
method is provided for compatibility with Java 5 SE. On a Java 6 SE
platform the same method implemented by the TreeSet
class should be used for better performance.Apache Camel