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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PSortedMap
<Long, E> private static final OrderedPSet
<Object> private static final long
-
Constructor Summary
Constructors -
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) int
size()
Methods inherited from class org.pcollections.AbstractUnmodifiableSet
add, addAll, clear, remove, removeAll, removeIf, retainAll
Methods inherited from class java.util.AbstractSet
equals, hashCode
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, 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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EMPTY
-
ids
-
elements
-
-
Constructor Details
-
OrderedPSet
-
-
Method Details
-
empty
-
from
-
singleton
-
plus
-
plusAll
-
minus
-
minusAll
-
intersect
-
iterator
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceSet<E>
- Specified by:
size
in classAbstractCollection<E>
-