Package akka.remote.artery
Class ImmutableLongMap<A>
- java.lang.Object
-
- akka.remote.artery.ImmutableLongMap<A>
-
public class ImmutableLongMap<A> extends java.lang.Object
INTERNAL API Specialized Map for primitiveLong
keys to avoid allocations (boxing). Keys and values are backed by arrays and lookup is performed with binary search. It's intended for rather small (<1000) maps.
-
-
Constructor Summary
Constructors Constructor Description ImmutableLongMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(long key)
Worst caseO(log n)
, allocation free.static <A> ImmutableLongMap<A>
empty(scala.reflect.ClassTag<A> t)
boolean
equals(java.lang.Object obj)
OptionVal<A>
get(long key)
Worst caseO(log n)
, allocation free.int
hashCode()
scala.collection.Iterator<java.lang.Object>
keysIterator()
All keysImmutableLongMap<A>
remove(long key)
int
size()
java.lang.String
toString()
ImmutableLongMap<A>
updated(long key, A value)
Worst caseO(log n)
, creates newImmutableLongMap
with copies of the internal arrays for the keys and values.
-
-
-
Method Detail
-
empty
public static <A> ImmutableLongMap<A> empty(scala.reflect.ClassTag<A> t)
-
size
public int size()
-
contains
public boolean contains(long key)
Worst caseO(log n)
, allocation free.
-
updated
public ImmutableLongMap<A> updated(long key, A value)
Worst caseO(log n)
, creates newImmutableLongMap
with copies of the internal arrays for the keys and values.
-
remove
public ImmutableLongMap<A> remove(long key)
-
keysIterator
public scala.collection.Iterator<java.lang.Object> keysIterator()
All keys
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-