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 | 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 |
---|---|
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
protected AbstractSortedBagDecorator()
protected AbstractSortedBagDecorator(SortedBag<E> bag)
bag
- the bag to decorate, must not be nullIllegalArgumentException
- if list is nullprotected SortedBag<E> decorated()
decorated
in class AbstractBagDecorator<E>
public E first()
SortedBag
public E last()
SortedBag
public Comparator<? super E> comparator()
SortedBag
comparator
in interface SortedBag<E>
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.