Interface PBag<E>

  • 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 Detail

      • plus

        PBag<E> plus​(E e)
        Specified by:
        plus in interface PCollection<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:
        plusAll in interface PCollection<E>
        Returns:
        a collection which contains all of the elements of list and this
      • minus

        PBag<E> minus​(java.lang.Object e)
        Specified by:
        minus in interface PCollection<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:
        minusAll in interface PCollection<E>
        Returns:
        this with all elements of list completely removed