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, uniqueSet
add, addAll, clear, contains, containsAll, 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
addAll, clear, contains, equals, hashCode, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray
protected 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()
SortedBag
public E last()
SortedBag
public Comparator<? super E> comparator()
SortedBag
comparator
in interface SortedBag<E>
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.