Class ForwardingSortedMultiset.StandardElementSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.google.common.collect.ForwardingSortedMultiset.StandardElementSet
- All Implemented Interfaces:
Iterable<E>, Collection<E>, NavigableSet<E>, SequencedCollection<E>, SequencedSet<E>, Set<E>, SortedSet<E>
- Enclosing class:
ForwardingSortedMultiset<E extends @Nullable Object>
A sensible implementation of
SortedMultiset.elementSet() in terms of the following
methods: Collection.clear(), SortedMultiset.comparator(), Multiset.contains(Object), Multiset.containsAll(Collection), Multiset.count(Object),
SortedMultiset.firstEntry() SortedMultiset.headMultiset(E, BoundType), Collection.isEmpty(), SortedMultiset.lastEntry(), SortedMultiset.subMultiset(E, BoundType, E, BoundType),
SortedMultiset.tailMultiset(E, BoundType), the size() and iterator() methods of
SortedMultiset.entrySet(), and Multiset.remove(Object, int). In many
situations, you may wish to override SortedMultiset.elementSet() to forward to this
implementation or a subclass thereof.- Since:
- 15.0
- Author:
- Louis Wasserman
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Comparator<? super E> booleanbooleancontainsAll(Collection<?> c) first()booleanisEmpty()iterator()last()pollLast()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Methods inherited from class AbstractSet
equals, hashCodeMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface NavigableSet
headSet, iterator, removeFirst, removeLast, reversed, subSet, tailSet
-
Constructor Details
-
StandardElementSet
public StandardElementSet()Constructor for use by subclasses.
-
-
Method Details
-
lower
-
floor
-
ceiling
-
higher
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<E extends @Nullable Object>
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<E extends @Nullable Object>
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<E extends @Nullable Object>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<E extends @Nullable Object>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSetin interfaceNavigableSet<E extends @Nullable Object>
-
headSet
- Specified by:
headSetin interfaceNavigableSet<E extends @Nullable Object>
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<E extends @Nullable Object>
-
iterator
-
comparator
- Specified by:
comparatorin interfaceSortedSet<E extends @Nullable Object>
-
subSet
-
headSet
-
tailSet
-
first
-
last
-
clear
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E extends @Nullable Object>- Specified by:
containsAllin interfaceSet<E extends @Nullable Object>- Overrides:
containsAllin classAbstractCollection<E extends @Nullable Object>
-
isEmpty
-
remove
-
size
-
removeAll
-
retainAll
-