E - the type of element in this setpublic class PSet<E> extends Object implements PersistentSet<E>
PersistentSet using Set.| Modifier and Type | Method and Description |
|---|---|
Set<E> |
asSet()
An immutable view of this as a
java.util.Set. |
boolean |
contains(E e) |
static <E> PSet<E> |
empty() |
PersistentSet<E> |
minus(E e) |
PersistentSet<E> |
plus(E e) |
Stream<E> |
stream() |
public static <E> PSet<E> empty()
empty in interface PersistentSet<E>public PersistentSet<E> plus(E e)
plus in interface PersistentSet<E>e - an elementepublic PersistentSet<E> minus(E e)
minus in interface PersistentSet<E>e - an elementepublic boolean contains(E e)
contains in interface PersistentSet<E>e - an elementepublic Stream<E> stream()
stream in interface PersistentSet<E>Stream of the elements in this setpublic Set<E> asSet()
PersistentSetjava.util.Set.asSet in interface PersistentSet<E>Licenced under the Apache License, Version 2.0