Class AbstractMultiSet.UniqueSet<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- org.apache.commons.collections4.multiset.AbstractMultiSet.UniqueSet<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Set<E>
- Enclosing class:
- AbstractMultiSet<E>
protected static class AbstractMultiSet.UniqueSet<E> extends AbstractSet<E>
Inner class UniqueSet.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractMultiSet<E>
parent
The parent multiset
-
Constructor Summary
Constructors Modifier Constructor Description protected
UniqueSet(AbstractMultiSet<E> parent)
Constructs a new unique element view of the MultiSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
contains(Object key)
boolean
containsAll(Collection<?> coll)
Iterator<E>
iterator()
boolean
remove(Object key)
int
size()
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
add, addAll, isEmpty, retainAll, toArray, toArray, toString
-
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
-
-
-
-
Field Detail
-
parent
protected final AbstractMultiSet<E> parent
The parent multiset
-
-
Constructor Detail
-
UniqueSet
protected UniqueSet(AbstractMultiSet<E> parent)
Constructs a new unique element view of the MultiSet.- Parameters:
parent
- the parent MultiSet
-
-
Method Detail
-
contains
public boolean contains(Object key)
- Specified by:
contains
in interfaceCollection<E>
- Specified by:
contains
in interfaceSet<E>
- Overrides:
contains
in classAbstractCollection<E>
-
containsAll
public boolean containsAll(Collection<?> coll)
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
- Overrides:
containsAll
in classAbstractCollection<E>
-
remove
public boolean remove(Object key)
- Specified by:
remove
in interfaceCollection<E>
- Specified by:
remove
in interfaceSet<E>
- Overrides:
remove
in classAbstractCollection<E>
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceSet<E>
- Specified by:
size
in classAbstractCollection<E>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<E>
- Specified by:
clear
in interfaceSet<E>
- Overrides:
clear
in classAbstractCollection<E>
-
-