Interface PSet<E>

Type Parameters:
E -
All Superinterfaces:
Collection<E>, Iterable<E>, PCollection<E>, Set<E>
All Known Subinterfaces:
PSortedSet<E>
All Known Implementing Classes:
MapPSet, OrderedPSet, TreePSet

public interface PSet<E> extends PCollection<E>, Set<E>
An immutable, persistent set, containing no duplicate elements.
  • Method Details

    • plus

      PSet<E> plus(E e)
      Specified by:
      plus in interface PCollection<E>
      Parameters:
      e -
      Returns:
      a collection which contains e and all of the elements of this
    • plusAll

      PSet<E> plusAll(Collection<? extends E> list)
      Specified by:
      plusAll in interface PCollection<E>
      Parameters:
      list -
      Returns:
      a collection which contains all of the elements of list and this
    • minus

      PSet<E> minus(Object e)
      Specified by:
      minus in interface PCollection<E>
      Parameters:
      e -
      Returns:
      this with a single instance of e removed, if e is in this
    • minusAll

      PSet<E> minusAll(Collection<?> list)
      Specified by:
      minusAll in interface PCollection<E>
      Parameters:
      list -
      Returns:
      this with all elements of list completely removed
    • intersect

      default PSet<E> intersect(Collection<? extends E> list)
      Returns:
      the equivalent of this.minusAll(this.minusAll(list)).