Package org.apache.lucene.search
Class Multiset<T>
java.lang.Object
java.util.AbstractCollection<T>
org.apache.lucene.search.Multiset<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>
A
Multiset is a set that allows for duplicate elements. Two Multisets are equal
if they contain the same unique elements and if each unique element has as many occurrences in
both multisets. Iteration order is not specified.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Multiset
public Multiset()Create an emptyMultiset.
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin classAbstractCollection<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein classAbstractCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>- Overrides:
clearin classAbstractCollection<T>
-
add
- Specified by:
addin interfaceCollection<T>- Overrides:
addin classAbstractCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>- Overrides:
removein classAbstractCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>- Overrides:
containsin classAbstractCollection<T>
-
equals
- Specified by:
equalsin interfaceCollection<T>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T>- Overrides:
hashCodein classObject
-