scala.collection.mutable

HashTable

trait HashTable[A] extends AnyRef

This class can be used to construct data structures that are based on hashtables. Class HashTable[A] implements a hashtable that maps keys of type A to values of the fully abstract member type Entry. Classes that make use of HashTable have to provide an implementation for Entry.

There are mainly two parameters that affect the performance of a hashtable: the initial size and the load factor. The size refers to the number of buckets in the hashtable, and the load factor is a measure of how full the hashtable is allowed to get before its size is automatically doubled. Both parameters may be changed by overriding the corresponding values in class HashTable.

A

type of the elements contained in this hash table.

go to: companion
known subclasses: HashMap, LinkedHashMap
source: HashTable.scala
    version
  1. 2.0, 31/12/2006

    since
  1. 1

    authors:
  1. Martin Odersky

  2. ,
  3. Matthias Zenger

Inherited
  1. Hide All
  2. Show all
  1. AnyRef
  2. Any
Visibility
  1. Public
  2. All

Type Members

  1. type Entry <: HashEntry[A, Entry] >: Null

Value Members

  1. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  7. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  8. def addEntry(e: Entry): Unit

    Add entry to table pre: no entry with same key exists

  9. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  10. def clearTable(): Unit

    Remove all entries from table

  11. def clone(): AnyRef

    This method creates and returns a copy of the receiver object.

  12. def elemEquals(key1: A, key2: A): Boolean

  13. def elemHashCode(key: A): Int

  14. def entries: Iterator[Entry]

    An iterator returning all entries

  15. def entriesIterator: Iterator[Entry]

    An iterator returning all entries.

  16. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  17. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

  18. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

  19. def findEntry(key: A): Entry

    Find entry with given key in table, null if not found.

  20. def foreachEntry[C](f: (Entry) ⇒ C): Unit

  21. def getClass(): java.lang.Class[_ <: java.lang.Object]

    Returns a representation that corresponds to the dynamic class of the receiver object.

  22. def hashCode(): Int

    Returns a hash code value for the object.

  23. def improve(hcode: Int): Int

  24. def index(hcode: Int): Int

  25. def initialSize: Int

    The initial size of the hash table.

  26. def initialThreshold: Int

    The initial threshold

  27. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  28. def loadFactor: Int

    The load factor for the hash table (in 0.

  29. val loadFactorDenum: Int

  30. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  31. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

  32. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

  33. def removeEntry(key: A): Entry

    Remove entry from table if present.

  34. def synchronized[T0](arg0: T0): T0

  35. var table: Array[HashEntry[A, Entry]]

    The actual hash table.

  36. var tableSize: Int

    The number of mappings contained in this hash table.

  37. var threshold: Int

    The next size value at which to resize (capacity * load factor).

  38. def toString(): String

    Returns a string representation of the object.

  39. def wait(): Unit

  40. def wait(arg0: Long, arg1: Int): Unit

  41. def wait(arg0: Long): Unit