Subtractable
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 Params
- A
the type of the elements of the collection.
- Repr
the type of the collection itself
- Deprecated
- Source
- Subtractable.scala
Value members
Abstract methods
Creates a new collection from this collection with an element removed.
Creates a new collection from this collection with an element removed.
- Value Params
- 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
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
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 Params
- 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
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 Params
- 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