Subtractable

@deprecated("Subtractable is deprecated. This is now implemented as part of SetOps, MapOps, etc.", "2.13.0")
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 -.

Type parameters:
A

the type of the elements of the collection.

Repr

the type of the collection itself

Deprecated
Source:
Subtractable.scala
class Object
trait Matchable
class Any
Subtractable[A, Repr]

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.

Value parameters:
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

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.

Value parameters:
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.

Value parameters:
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