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(java.lang.Object)
, Multiset.containsAll(java.util.Collection<?>)
, Multiset.count(java.lang.Object)
,
SortedMultiset.firstEntry()
SortedMultiset.headMultiset(E, com.google.common.collect.BoundType)
, Collection.isEmpty()
, SortedMultiset.lastEntry()
, SortedMultiset.subMultiset(E, com.google.common.collect.BoundType, E, com.google.common.collect.BoundType)
,
SortedMultiset.tailMultiset(E, com.google.common.collect.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Comparator
<? super E> boolean
boolean
containsAll
(Collection<?> c) first()
boolean
isEmpty()
iterator()
last()
pollLast()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Methods inherited from class java.util.AbstractSet
equals, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.NavigableSet
headSet, iterator, removeFirst, removeLast, reversed, subSet, tailSet
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.util.SortedSet
addFirst, addLast, comparator, first, getFirst, getLast, last, spliterator
-
Constructor Details
-
StandardElementSet
public StandardElementSet()Constructor for use by subclasses.
-
-
Method Details
-
lower
-
floor
-
ceiling
-
higher
-
descendingSet
- Specified by:
descendingSet
in interfaceNavigableSet<E extends @Nullable Object>
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<E extends @Nullable Object>
-
pollFirst
- Specified by:
pollFirst
in interfaceNavigableSet<E extends @Nullable Object>
-
pollLast
- Specified by:
pollLast
in interfaceNavigableSet<E extends @Nullable Object>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSet
in interfaceNavigableSet<E extends @Nullable Object>
-
headSet
- Specified by:
headSet
in interfaceNavigableSet<E extends @Nullable Object>
-
tailSet
- Specified by:
tailSet
in interfaceNavigableSet<E extends @Nullable Object>
-
iterator
-
comparator
- Specified by:
comparator
in interfaceSortedSet<E extends @Nullable Object>
-
subSet
-
headSet
-
tailSet
-
first
-
last
-
clear
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E extends @Nullable Object>
- Specified by:
containsAll
in interfaceSet<E extends @Nullable Object>
- Overrides:
containsAll
in classAbstractCollection<E extends @Nullable Object>
-
isEmpty
-
remove
-
size
-
removeAll
-
retainAll
-