Package akka.util
Class ImmutableIntMap
- java.lang.Object
-
- akka.util.ImmutableIntMap
-
public final class ImmutableIntMap extends java.lang.Object
Worst caseO(log n)
, allocation free. Will return Int.MinValue if not found, so beware of storing Int.MinValues
-
-
Constructor Summary
Constructors Constructor Description ImmutableIntMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(int key)
Worst caseO(log n)
, allocation free.static ImmutableIntMap
empty()
boolean
equals(java.lang.Object obj)
int
get(int key)
Worst caseO(log n)
, allocation free.int
hashCode()
scala.collection.Iterator<java.lang.Object>
keysIterator()
All keysImmutableIntMap
remove(int key)
Worst caseO(n)
, creates newImmutableIntMap
without the given key.int
size()
java.lang.String
toString()
ImmutableIntMap
updated(int key, int value)
Worst caseO(n)
, creates newImmutableIntMap
with the given key with the given value.ImmutableIntMap
updateIfAbsent(int key, scala.Function0<java.lang.Object> value)
Worst caseO(n)
, creates newImmutableIntMap
with the given key and value if that key is not yet present in the map.
-
-
-
Method Detail
-
empty
public static final ImmutableIntMap empty()
-
size
public final int size()
-
get
public final int get(int key)
Worst caseO(log n)
, allocation free. Will return Int.MinValue if not found, so beware of storing Int.MinValues- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
-
contains
public final boolean contains(int key)
Worst caseO(log n)
, allocation free.- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
-
updateIfAbsent
public final ImmutableIntMap updateIfAbsent(int key, scala.Function0<java.lang.Object> value)
Worst caseO(n)
, creates newImmutableIntMap
with the given key and value if that key is not yet present in the map.- Parameters:
key
- (undocumented)value
- (undocumented)- Returns:
- (undocumented)
-
updated
public final ImmutableIntMap updated(int key, int value)
Worst caseO(n)
, creates newImmutableIntMap
with the given key with the given value.- Parameters:
key
- (undocumented)value
- (undocumented)- Returns:
- (undocumented)
-
remove
public final ImmutableIntMap remove(int key)
Worst caseO(n)
, creates newImmutableIntMap
without the given key.- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
-
keysIterator
public final scala.collection.Iterator<java.lang.Object> keysIterator()
All keys- Returns:
- (undocumented)
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-