HashSet

class HashSet[T](initialCapacity: Int, capacityMultiple: Int) extends MutableSet[T]

A hash set that allows some privileged protected access to its internals

Value Params
capacityMultiple

The minimum multiple of capacity relative to used elements. The hash table will be re-sized once the number of elements multiplied by capacityMultiple exceeds the current size of the hash table. However, a table of size up to DenseLimit will be re-sized only once the number of elements reaches the table's size.

initialCapacity

Indicates the initial number of slots in the hash table. The actual number of slots is always a power of 2, so the initial size of the table will be the smallest power of two that is equal or greater than the given initialCapacity. Minimum value is 4.

Companion
object
class MutableSet[T]
class ReadOnlySet[T]
class Object
trait Matchable
class Any

Type members

Classlikes

abstract class EntryIterator extends Iterator[T]

Value members

Concrete methods

def +=(x: T): Unit
def -=(x: T): Unit
def clear(): Unit

Remove all elements from this set and set back to initial configuration

Remove all elements from this set and set back to initial configuration

def copyFrom(oldTable: Array[AnyRef]): Unit
def lookup(x: T): T | Null
def put(x: T): T
def remove(x: T): Boolean
def size: Int

The number of elements in the set

The number of elements in the set

override def toString: String
Definition Classes
Any

Inherited methods

def ++=(xs: IterableOnce[T]): Unit
Inherited from
MutableSet
def --=(xs: IterableOnce[T]): Unit
Inherited from
MutableSet
def contains(x: T): Boolean
Inherited from
ReadOnlySet
def foreach[U](f: T => U): Unit
Inherited from
ReadOnlySet
Inherited from
ReadOnlySet
def toList: List[T]
Inherited from
ReadOnlySet