E - the type of elements in this bagpublic 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, equals, getCount, hashCode, remove, uniqueSetadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, setCollection, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, containsAll, getCount, iterator, remove, remove, removeAll, retainAll, size, uniqueSetaddAll, clear, contains, equals, hashCode, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArrayprotected AbstractSortedBagDecorator()
protected AbstractSortedBagDecorator(SortedBag<E> bag)
bag - the bag to decorate, must not be nullNullPointerException - if bag is nullprotected SortedBag<E> decorated()
decorated in class AbstractBagDecorator<E>public E first()
SortedBagpublic E last()
SortedBagpublic Comparator<? super E> comparator()
SortedBagcomparator in interface SortedBag<E>Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.