MutableSet

abstract class MutableSet[T] extends ReadOnlySet[T]

A common class for lightweight mutable sets.

class ReadOnlySet[T]
class Object
trait Matchable
class Any

Value members

Abstract methods

def +=(x: T): Unit

Add element x to the set

Add element x to the set

def -=(x: T): Unit

Remove element x from the set

Remove element x from the set

def clear(): Unit
def put(x: T): T

Like += but return existing element equal to x of it exists, x itself otherwise.

Like += but return existing element equal to x of it exists, x itself otherwise.

Concrete methods

def ++=(xs: IterableOnce[T]): Unit
def --=(xs: IterableOnce[T]): Unit

Inherited methods

def contains(x: T): Boolean
Inherited from:
ReadOnlySet
def foreach[U](f: T => U): Unit
Inherited from:
ReadOnlySet
Inherited from:
ReadOnlySet
Inherited from:
ReadOnlySet
def lookup(x: T): T | Null

The entry in the set such that isEqual(x, entry), or else null.

The entry in the set such that isEqual(x, entry), or else null.

Inherited from:
ReadOnlySet
def size: Int
Inherited from:
ReadOnlySet
def toList: List[T]
Inherited from:
ReadOnlySet