Package org.apache.lucene.search
Class Multiset<T>
- java.lang.Object
-
- java.util.AbstractCollection<T>
-
- org.apache.lucene.search.Multiset<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
public final class Multiset<T> extends java.util.AbstractCollection<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T e)
void
clear()
boolean
contains(java.lang.Object o)
boolean
equals(java.lang.Object obj)
int
hashCode()
java.util.Iterator<T>
iterator()
boolean
remove(java.lang.Object o)
int
size()
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
map
private final java.util.Map<T,java.lang.Integer> map
-
size
private int size
-
-
Constructor Detail
-
Multiset
public Multiset()
Create an emptyMultiset
.
-
-
Method Detail
-
iterator
public java.util.Iterator<T> iterator()
-
size
public int size()
-
clear
public void clear()
-
add
public boolean add(T e)
-
remove
public boolean remove(java.lang.Object o)
-
contains
public boolean contains(java.lang.Object o)
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejava.util.Collection<T>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<T>
- Overrides:
hashCode
in classjava.lang.Object
-
-