java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.pcollections.AbstractUnmodifiableSet<E>
org.pcollections.OrderedPSet<E>
- Type Parameters:
E-
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Set<E>,PCollection<E>,PSet<E>
Like
PSet but preserves insertion order. Persistent equivalent of LinkedHashSet.
(Note: this is different from PSortedSet, which keeps elements in the order specified
by Comparable.compareTo(Object) or Comparator.compare(Object, Object).)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> OrderedPSet<E>empty()static <E> OrderedPSet<E>from(Collection<? extends E> list) intersect(Collection<? extends E> list) iterator()minusAll(Collection<?> list) plusAll(Collection<? extends E> list) static <E> OrderedPSet<E>singleton(E e) intsize()Methods inherited from class org.pcollections.AbstractUnmodifiableSet
add, addAll, clear, remove, removeAll, removeIf, retainAllMethods inherited from class java.util.AbstractSet
equals, hashCodeMethods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
empty
-
from
-
singleton
-
plus
-
plusAll
-
minus
-
minusAll
-
intersect
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceSet<E>- Specified by:
sizein classAbstractCollection<E>
-