Class AbstractSortedBagDecorator<E>
java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections4.bag.AbstractBagDecorator<E>
org.apache.commons.collections4.bag.AbstractSortedBagDecorator<E>
- Type Parameters:
- E- the type of elements in this bag
- All Implemented Interfaces:
- Serializable,- Iterable<E>,- Collection<E>,- Bag<E>,- SortedBag<E>
- Direct Known Subclasses:
- CollectionSortedBag,- UnmodifiableSortedBag
public abstract class AbstractSortedBagDecorator<E>
extends AbstractBagDecorator<E>
implements SortedBag<E>
Decorates another 
SortedBag to provide additional behavior.
 Methods are forwarded directly to the decorated bag.
- Since:
- 3.0
- See Also:
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor only used in deserialization, do not use otherwise.protectedConstructor that wraps (not copies).
- 
Method SummaryModifier and TypeMethodDescriptionComparator<? super E> Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.Gets the bag being decorated.first()Returns the first (lowest) member.last()Returns the last (highest) member.Methods inherited from class org.apache.commons.collections4.bag.AbstractBagDecoratoradd, equals, getCount, hashCode, remove, uniqueSetMethods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecoratoradd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, setCollection, size, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.collections4.Bagadd, add, containsAll, getCount, iterator, remove, remove, removeAll, retainAll, size, uniqueSetMethods inherited from interface java.util.CollectionaddAll, clear, contains, equals, hashCode, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray
- 
Constructor Details- 
AbstractSortedBagDecoratorprotected AbstractSortedBagDecorator()Constructor only used in deserialization, do not use otherwise.- Since:
- 3.1
 
- 
AbstractSortedBagDecoratorConstructor that wraps (not copies).- Parameters:
- bag- the bag to decorate, must not be null
- Throws:
- NullPointerException- if bag is null
 
 
- 
- 
Method Details- 
comparatorDescription copied from interface:SortedBagReturns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.- Specified by:
- comparatorin interface- SortedBag<E>
- Returns:
- the comparator in use, or null if natural ordering
 
- 
decorated
- 
first
- 
last
 
-