E
- public final class MapPSet<E> extends AbstractSet<E> implements PSet<E>, Serializable
If the backing map is thread-safe, then this implementation is thread-safe (assuming Java's AbstractSet is thread-safe), although its iterators may not be.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object e) |
static <E> MapPSet<E> |
from(PMap<E,?> map) |
static <E> MapPSet<E> |
from(PMap<E,?> map,
Collection<? extends E> list) |
static <E> MapPSet<E> |
from(PMap<E,?> map,
E e) |
Iterator<E> |
iterator() |
MapPSet<E> |
minus(Object e) |
MapPSet<E> |
minusAll(Collection<?> list) |
MapPSet<E> |
plus(E e) |
MapPSet<E> |
plusAll(Collection<? extends E> list) |
int |
size() |
equals, hashCode, removeAll
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, remove, removeAll, retainAll
add, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public static <E> MapPSet<E> from(PMap<E,?> map)
E
- map
- public static <E> MapPSet<E> from(PMap<E,?> map, E e)
E
- map
- e
- public static <E> MapPSet<E> from(PMap<E,?> map, Collection<? extends E> list)
E
- map
- list
- public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractCollection<E>
public boolean contains(Object e)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
public MapPSet<E> plusAll(Collection<? extends E> list)
public MapPSet<E> minusAll(Collection<?> list)
Copyright © 2019. All rights reserved.