- java.lang.Object
-
- org.pcollections.HashTreePSet
-
public final class HashTreePSet extends java.lang.ObjectA static convenience class for creating efficient persistent sets.This class simply creates MapPSets backed by HashTreePMaps.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateHashTreePSet()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> MapPSet<E>empty()static <E> MapPSet<E>from(java.util.Collection<? extends E> list)static <E> MapPSet<E>singleton(E e)
-
-
-
Field Detail
-
EMPTY
private static final MapPSet<java.lang.Object> EMPTY
-
-
Method Detail
-
empty
public static <E> MapPSet<E> empty()
- Type Parameters:
E-- Returns:
- an empty set
-
singleton
public static <E> MapPSet<E> singleton(E e)
- Type Parameters:
E-- Parameters:
e-- Returns:
- empty().plus(e)
-
from
public static <E> MapPSet<E> from(java.util.Collection<? extends E> list)
- Type Parameters:
E-- Parameters:
list-- Returns:
- empty().plusAll(map)
-
-