final class DeboxMap[A, B] extends (A) ⇒ B with Serializable
An hash map optimized for performance, not incurring in boxing while storing primitive values.
- A
the type of the keys
- B
the type of the values
- Alphabetic
- By Inheritance
- DeboxMap
- Serializable
- Serializable
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
DeboxMap(ks: Array[A], vs: Array[B], bs: Array[Byte], n: Int, u: Int)(implicit arg0: ClassTag[A], arg1: ClassTag[B])
- Attributes
- protected[eu.shiftforward.apso]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (B) ⇒ A): (A) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
apply(key: A): B
Returns the value associated with a key.
Returns the value associated with a key. If the key does not exist, a
NotFoundexception is thrown.- key
the key to lookup
- returns
the value associated with the given key.
- Definition Classes
- DeboxMap → Function1
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- var buckets: Array[Byte]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compose[A](g: (A) ⇒ A): (A) ⇒ B
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
contains(key: A): Boolean
Tests if this map contains a given key.
Tests if this map contains a given key.
- key
the key to test for membership
- returns
trueif the map contains the given key,falseotherwise.
-
final
def
copy: DeboxMap[A, B]
Returns a copy of this map.
Returns a copy of this map.
- returns
a copy of this map.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
equals(that: Any): Boolean
- Definition Classes
- DeboxMap → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
foreach(f: (A, B) ⇒ Unit): Unit
Applies a function
fto all entries of this map.Applies a function
fto all entries of this map.- f
the function that is applied for its side-effect to every element. The result of function
fis discarded.
-
final
def
get(key: A): Option[B]
Returns the value associated with a key or
Noneif the key does not exist.Returns the value associated with a key or
Noneif the key does not exist.- key
the key to lookup
- returns
the value associated with the given key wrapped in a
Someif this map contains the key,Noneotherwise.
- def getBuckets: Array[Byte]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
getOrElse(key: A, default: ⇒ B): B
Returns the value associated with a key or a default value if the key does not exist.
Returns the value associated with a key or a default value if the key does not exist.
- key
the key to lookup
- default
the value to return if this map does not contain the given key
- returns
the value associated with the given key if this map contains the key,
defaultotherwise.
-
final
def
getOrElseUpdate(key: A, default: ⇒ B): B
If given key is already in this map, returns associated value.
If given key is already in this map, returns associated value. Otherwise, stores the given default value with key in map and returns that value.
- key
the key to lookup
- default
the value to associate with key, if key is previously unbound.
- returns
the value associated with the given key if this map contains the key,
defaultotherwise.
- final def hash(item: A, _mask: Int, _keys: Array[A], _buckets: Array[Byte]): Int
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var keys: Array[A]
- var len: Int
-
final
def
length: Int
Returns the number of entries in this map.
Returns the number of entries in this map.
- returns
the number of entries in this map.
- var limit: Int
-
final
def
map[C](f: (A, B) ⇒ C): List[C]
Builds a new list by applying a function to all entries of this map.
Builds a new list by applying a function to all entries of this map.
- C
the type of the elements in the returned list
- f
the function to apply to each element
- returns
a new list resulting from applying the given function
fto each element of this map and collecting the results.
- var mask: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
remove(key: A): Unit
Removes a key from this map.
Removes a key from this map. If the key does not exist, this method does nothing.
- key
the key to remove
- final def resize(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Function1 → AnyRef → Any
-
final
def
update(key: A, value: B): Unit
Updates the value of a key.
Updates the value of a key. If the key does not exist, it is added to the map.
- key
the key to update
- value
the value to assign to the given key
- var used: Int
- var vals: Array[B]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )