-
- Type Parameters:
E-
- All Superinterfaces:
java.util.Collection<E>,java.lang.Iterable<E>
- All Known Subinterfaces:
PBag<E>,PQueue<E>,PSequence<E>,PSet<E>,PSortedSet<E>,PStack<E>,PVector<E>
- All Known Implementing Classes:
AmortizedPQueue,ConsPStack,MapPBag,MapPSet,OrderedPSet,TreePSet,TreePVector
public interface PCollection<E> extends java.util.Collection<E>An immutable, persistent collection of elements of type E.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanadd(E o)Deprecated.booleanaddAll(java.util.Collection<? extends E> c)Deprecated.voidclear()Deprecated.PCollection<E>minus(java.lang.Object e)PCollection<E>minusAll(java.util.Collection<?> list)PCollection<E>plus(E e)PCollection<E>plusAll(java.util.Collection<? extends E> list)booleanremove(java.lang.Object o)Deprecated.booleanremoveAll(java.util.Collection<?> c)Deprecated.booleanretainAll(java.util.Collection<?> c)Deprecated.
-
-
-
Method Detail
-
plus
PCollection<E> plus(E e)
- Parameters:
e-- Returns:
- a collection which contains e and all of the elements of this
-
plusAll
PCollection<E> plusAll(java.util.Collection<? extends E> list)
- Parameters:
list-- Returns:
- a collection which contains all of the elements of list and this
-
minus
PCollection<E> minus(java.lang.Object e)
- Parameters:
e-- Returns:
- this with a single instance of e removed, if e is in this
-
minusAll
PCollection<E> minusAll(java.util.Collection<?> list)
- Parameters:
list-- Returns:
- this with all elements of list completely removed
-
add
@Deprecated boolean add(E o)
Deprecated.- Specified by:
addin interfacejava.util.Collection<E>
-
remove
@Deprecated boolean remove(java.lang.Object o)
Deprecated.- Specified by:
removein interfacejava.util.Collection<E>
-
addAll
@Deprecated boolean addAll(java.util.Collection<? extends E> c)
Deprecated.- Specified by:
addAllin interfacejava.util.Collection<E>
-
removeAll
@Deprecated boolean removeAll(java.util.Collection<?> c)
Deprecated.- Specified by:
removeAllin interfacejava.util.Collection<E>
-
retainAll
@Deprecated boolean retainAll(java.util.Collection<?> c)
Deprecated.- Specified by:
retainAllin interfacejava.util.Collection<E>
-
clear
@Deprecated void clear()
Deprecated.- Specified by:
clearin interfacejava.util.Collection<E>
-
-