E
- public final class MapPBag<E> extends AbstractCollection<E> implements PBag<E>, Serializable
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.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object e) |
static <E> MapPBag<E> |
empty(PMap<E,Integer> map) |
boolean |
equals(Object that) |
int |
hashCode() |
Iterator<E> |
iterator() |
MapPBag<E> |
minus(Object e) |
MapPBag<E> |
minusAll(Collection<?> list) |
MapPBag<E> |
plus(E e) |
MapPBag<E> |
plusAll(Collection<? extends E> list) |
int |
size() |
add, addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, remove, removeAll, retainAll
containsAll, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray
public static <E> MapPBag<E> empty(PMap<E,Integer> map)
E
- map
- public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in class AbstractCollection<E>
public boolean contains(Object e)
contains
in interface Collection<E>
contains
in class AbstractCollection<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in class Object
public boolean equals(Object that)
equals
in interface Collection<E>
equals
in class Object
public MapPBag<E> plusAll(Collection<? extends E> list)
public MapPBag<E> minusAll(Collection<?> list)
Copyright © 2019. All rights reserved.