public abstract class AbstractSortedBagDecorator<E> extends AbstractBagDecorator<E> implements SortedBag<E>
SortedBag
to provide additional behaviour.
Methods are forwarded directly to the decorated bag.
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serialization version
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractSortedBagDecorator()
Constructor only used in deserialization, do not use otherwise.
|
protected |
AbstractSortedBagDecorator(SortedBag<E> bag)
Constructor that wraps (not copies).
|
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<? super E> |
comparator()
Returns the comparator associated with this sorted set, or null
if it uses its elements' natural ordering.
|
protected SortedBag<E> |
decorated()
Gets the bag being decorated.
|
E |
first()
Returns the first (lowest) member.
|
E |
last()
Returns the last (highest) member.
|
add, getCount, remove, uniqueSet
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, containsAll, getCount, iterator, remove, remove, removeAll, retainAll, size, uniqueSet
private static final long serialVersionUID
protected AbstractSortedBagDecorator()
protected SortedBag<E> decorated()
decorated
in class AbstractBagDecorator<E>
public E first()
SortedBag
public E last()
SortedBag
public java.util.Comparator<? super E> comparator()
SortedBag
comparator
in interface SortedBag<E>