-
- Type Parameters:
E
-
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
,PCollection<E>
,java.util.Set<E>
- All Known Subinterfaces:
PSortedSet<E>
- All Known Implementing Classes:
MapPSet
,OrderedPSet
,TreePSet
public interface PSet<E> extends PCollection<E>, java.util.Set<E>
An immutable, persistent set, containing no duplicate elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PSet<E>
intersect(java.util.Collection<? extends E> list)
PSet<E>
minus(java.lang.Object e)
PSet<E>
minusAll(java.util.Collection<?> list)
PSet<E>
plus(E e)
PSet<E>
plusAll(java.util.Collection<? extends E> list)
-
-
-
Method Detail
-
plus
PSet<E> plus(E e)
- Specified by:
plus
in interfacePCollection<E>
- Returns:
- a collection which contains e and all of the elements of this
-
plusAll
PSet<E> plusAll(java.util.Collection<? extends E> list)
- Specified by:
plusAll
in interfacePCollection<E>
- Returns:
- a collection which contains all of the elements of list and this
-
minus
PSet<E> minus(java.lang.Object e)
- Specified by:
minus
in interfacePCollection<E>
- Returns:
- this with a single instance of e removed, if e is in this
-
minusAll
PSet<E> minusAll(java.util.Collection<?> list)
- Specified by:
minusAll
in interfacePCollection<E>
- Returns:
- this with all elements of list completely removed
-
-