-
- Type Parameters:
E-
- All Superinterfaces:
java.util.Collection<E>,java.lang.Iterable<E>,PCollection<E>
- All Known Implementing Classes:
MapPBag
public interface PBag<E> extends PCollection<E>
An unordered collection allowing duplicate elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PBag<E>minus(java.lang.Object e)PBag<E>minusAll(java.util.Collection<?> list)PBag<E>plus(E e)PBag<E>plusAll(java.util.Collection<? extends E> list)
-
-
-
Method Detail
-
plus
PBag<E> plus(E e)
- Specified by:
plusin interfacePCollection<E>- Returns:
- a collection which contains e and all of the elements of this
-
plusAll
PBag<E> plusAll(java.util.Collection<? extends E> list)
- Specified by:
plusAllin interfacePCollection<E>- Returns:
- a collection which contains all of the elements of list and this
-
minus
PBag<E> minus(java.lang.Object e)
- Specified by:
minusin interfacePCollection<E>- Returns:
- this with a single instance of e removed, if e is in this
-
minusAll
PBag<E> minusAll(java.util.Collection<?> list)
- Specified by:
minusAllin interfacePCollection<E>- Returns:
- this with all elements of list completely removed
-
-