LinHashMap
The LinHashMap
class provides hash maps that use the Linear Hashing algorithm. A hash table is created that is an expandable array-list (ArrayBuffer
) of buckets. Inserts may cause the allocation of overflow buckets as well as the splitting of home buckets. Uses the SRI rule: Split, Rehash, and then Insert.
Type parameters
- K
-
the type of the keys contained in this hash map
- V
-
the type of the values assigned to keys in this hash map
Value parameters
- loadFac
-
the (lower, upper) bound on the load factor (# keys over # home slots)
- order
-
the number of slots per bucket
Attributes
- Graph
-
- Supertypes
-
trait Serializableclass AbstractMap[K, V]trait Map[K, V]trait MapOps[K, V, Map, Map[K, V]]trait Shrinkable[K]trait Builder[(K, V), Map[K, V]]trait Growable[(K, V)]trait Clearabletrait Cloneable[Map[K, V]]trait Cloneabletrait Iterable[(K, V)]class AbstractMap[K, V]trait Map[K, V]trait Equalstrait MapFactoryDefaults[K, V, Map, Iterable]trait MapOps[K, V, Map, Map[K, V]]trait PartialFunction[K, V]trait K => Vclass AbstractIterable[(K, V)]trait Iterable[(K, V)]trait IterableFactoryDefaults[(K, V), Iterable]trait IterableOps[(K, V), Iterable, Map[K, V]]trait IterableOnceOps[(K, V), Iterable, Map[K, V]]trait IterableOnce[(K, V)]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Members list
Type members
Classlikes
The Bucket
inner class defines buckets that are stored in this hash table.
The Bucket
inner class defines buckets that are stored in this hash table.
Attributes
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
The HTIterator
inner class supports iterating over all the elements in a Hash-Table by traversing through the buckets in this hash table.
The HTIterator
inner class supports iterating over all the elements in a Hash-Table by traversing through the buckets in this hash table.
Value parameters
- bs
-
the starting home bucket (defaults to hTable(0))
- is
-
the starting bucket chain (defaults to 0)
- js
-
the starting within node index (defaults to 0)
Attributes
- Supertypes
-
trait Iterator[(K, V)]trait IterableOnceOps[(K, V), Iterator, Iterator[(K, V)]]trait IterableOnce[(K, V)]class Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Add one key-value pair into this hash table and return this (called by put). Note: it splits the 'isplit' bucket chain when the load factor is exceeded.
Add one key-value pair into this hash table and return this (called by put). Note: it splits the 'isplit' bucket chain when the load factor is exceeded.
Value parameters
- elem
-
the key-value pair to add/insert
Attributes
Return the value associated with the key by looking it up in this hash table.
Return the value associated with the key by looking it up in this hash table.
Value parameters
- key
-
the key used for look up
Attributes
Return an iterator for retrieving all the elements in this hash table.
Return an iterator for retrieving all the elements in this hash table.
Attributes
- See also
-
scala.collection.IterableOnce
Show/print this hash table.
Show/print this hash table.
Attributes
Return the size (order * number of home buckets) of this hash table.
Return the size (order * number of home buckets) of this hash table.
Attributes
- Definition Classes
-
IterableOnceOps
Subtract/remove the one element (key-value pair) with the given key. Note: it merges home buckets when load factor is too low.
Subtract/remove the one element (key-value pair) with the given key. Note: it merges home buckets when load factor is too low.
Value parameters
- key
-
the key whose element is to be removed
Attributes
Inherited methods
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- Growable
Attributes
- Inherited from:
- Growable
Attributes
- Inherited from:
- Shrinkable
Attributes
- Inherited from:
- Shrinkable
Attributes
- Inherited from:
- Growable
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
-
MapOps -> IterableOnceOps
- Inherited from:
- MapOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
-
PartialFunction -> Function1
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- MapOps
Attributes
- Definition Classes
-
MapOps -> PartialFunction
- Inherited from:
- MapOps
Attributes
- Inherited from:
- Map
Attributes
- Inherited from:
- MapOps
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
Attributes
- Returns
-
a copy of the receiver object.
- Note
-
not specified by SLS as a member of AnyRef
- Definition Classes
-
MapOps -> Cloneable -> Object
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- Function1
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
-
MapFactoryDefaults -> IterableOps
- Inherited from:
- MapFactoryDefaults
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
- Returns
-
true
if the receiver object is equivalent to the argument;false
otherwise. - Definition Classes
-
Map -> Equals -> Any
- Inherited from:
- Map
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- MapOps
Attributes
- Definition Classes
-
MapFactoryDefaults -> IterableOps
- Inherited from:
- MapFactoryDefaults
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
Map -> Any
- Inherited from:
- Map
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
Iterable -> Iterable -> IterableOps
- Inherited from:
- Iterable
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Definition Classes
-
MapOps -> Growable -> IterableOnce
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- Iterable
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Definition Classes
-
Map -> Map -> MapOps
- Inherited from:
- Map
Attributes
- Inherited from:
- Builder
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Definition Classes
-
MapFactoryDefaults -> IterableOps
- Inherited from:
- MapFactoryDefaults
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- Cloneable
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- Builder
Attributes
- Inherited from:
- Builder
Attributes
- Inherited from:
- Builder
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnce
Attributes
- Inherited from:
- Shrinkable
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Map -> Function1 -> Iterable -> Any
- Inherited from:
- Map
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Inherited from:
- MapOps
Attributes
- Definition Classes
-
MapOps -> IterableOps
- Inherited from:
- MapOps
Attributes
- Inherited from:
- Map
Attributes
- Inherited from:
- Map
Attributes
- Definition Classes
-
MapFactoryDefaults -> IterableOps
- Inherited from:
- MapFactoryDefaults
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Deprecated and Inherited methods
Attributes
- Deprecated
-
[Since version 2.13.0]
Use ++ with an explicit collection argument instead of + with varargs - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Consider requiring an immutable Map or fall back to Map.concat. - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use ++ instead of ++: for collections of type Iterable - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use ++ instead of ++: for collections of type Iterable - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated - Inherited from:
- Growable
Attributes
- Deprecated
-
[Since version 2.13.0]
Use -- or removeAll on an immutable Map - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use - or remove on an immutable Map - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Consider requiring an immutable Map. - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.3]
Use `--=` aka `subtractAll` instead of varargs `-=`; infix operations with an operand of multiple args will be deprecated - Inherited from:
- Shrinkable
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldLeft instead of /: - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldRight instead of :\\ - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead. - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use iterableFactory instead - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use `dest ++= coll` instead - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .view.filterKeys(f). A future version will include a strict version of this method (for now, .view.filterKeys(p).toMap). - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details) - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .view.mapValues(f). A future version will include a strict version of this method (for now, .view.mapValues(f).toMap). - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use filterInPlace instead - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Iterable.seq always returns the iterable itself - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.7]
toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .iterator instead of .toIterator - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use mapValuesInPlace instead - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use m.clone().addOne((k,v)) instead of m.updated(k, v) - Inherited from:
- MapOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .view.slice(from, until) instead of .view(from, until) - Inherited from:
- IterableOps