Class MapPBag<E>
java.lang.Object
java.util.AbstractCollection<E>
org.pcollections.AbstractUnmodifiableCollection<E>
org.pcollections.MapPBag<E>
- Type Parameters:
E-
- All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, PBag<E>, PCollection<E>
public final class MapPBag<E>
extends AbstractUnmodifiableCollection<E>
implements PBag<E>, Serializable
A map-backed persistent bag.
If the backing map is thread-safe, then this implementation is thread-safe (assuming Java's AbstractCollection is thread-safe), although its iterators may not be.
- Author:
- harold
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean/ OVERRIDDEN METHODS OF AbstractCollection ////static <E> MapPBag<E> booleaninthashCode()iterator()minusAll(Collection<?> list) / IMPLEMENTED METHODS OF PSet ////plusAll(Collection<? extends E> list) intsize()/ REQUIRED METHODS FROM AbstractCollection ////Methods inherited from class AbstractUnmodifiableCollection
add, addAll, clear, remove, removeAll, removeIf, retainAllMethods inherited from class AbstractCollection
containsAll, isEmpty, toArray, toArray, toStringMethods inherited from interface Collection
containsAll, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray, toArray
-
Method Details
-
empty
-
size
public int size()/ REQUIRED METHODS FROM AbstractCollection ////- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
iterator
-
contains
/ OVERRIDDEN METHODS OF AbstractCollection ////- Specified by:
containsin interfaceCollection<E>- Overrides:
containsin classAbstractCollection<E>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<E>- Overrides:
hashCodein classObject
-
equals
-
plus
-
minus
-
plusAll
-
minusAll
-