Subtractable

scala.collection.generic.Subtractable
trait Subtractable[A, +Repr <: Subtractable[A, Repr]]

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 -.

Attributes

A

the type of the elements of the $coll.

Repr

the type of the $coll itself

Deprecated
true
Source:
Subtractable.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Subtractable[A, Repr]

Members list

Concise view

Value members

Abstract methods

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.

Attributes

elem

the element to remove

Returns:

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

Source:
Subtractable.scala
protected def repr: Repr

The representation object of type Repr which contains the collection's elements

The representation object of type Repr which contains the collection's elements

Attributes

Source:
Subtractable.scala

Concrete methods

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.

Attributes

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.

Source:
Subtractable.scala
def --(xs: IterableOnce[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.

Attributes

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.

Source:
Subtractable.scala