Packages

t

scala.collection.generic

Subtractable

trait Subtractable[A, +Repr <: Subtractable[A, Repr]] extends AnyRef

This trait represents collection-like objects that can be reduced using a '+' operator. It defines variants of - and -- as convenience methods in terms of single-element removal -.

A

the type of the elements of the collection.

Repr

the type of the collection itself

Self Type
Subtractable[A, Repr]
Source
Subtractable.scala
Version

2.8

Since

2.8

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Subtractable
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def -(elem: A): Repr

    Creates a new collection from this collection with an element removed.

    Creates a new collection from this collection with an element removed.

    elem

    the element to remove

    returns

    a new collection that contains all elements of the current collection except one less occurrence of elem.

Concrete Value Members

  1. def -(elem1: A, elem2: A, elems: A*): Repr

    Creates a new collection from this collection with some elements removed.

    Creates a new collection from this collection with some elements removed.

    This method takes two or more elements to be removed. Another overloaded variant of this method handles the case where a single element is removed.

    elem1

    the first element to remove.

    elem2

    the second element to remove.

    elems

    the remaining elements to remove.

    returns

    a new collection that contains all elements of the current collection except one less occurrence of each of the given elements.

  2. def --(xs: GenTraversableOnce[A]): Repr

    Creates a new collection from this collection by removing all elements of another collection.

    Creates a new collection from this collection by removing all elements of another collection.

    xs

    the collection containing the removed elements.

    returns

    a new collection that contains all elements of the current collection except one less occurrence of each of the elements of elems.