Package com.strobel.componentmodel
Class ArrayKeyMap
- java.lang.Object
-
- com.strobel.componentmodel.ArrayKeyMap
-
- All Implemented Interfaces:
FrugalKeyMap
final class ArrayKeyMap extends java.lang.Object implements FrugalKeyMap
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
_keyIndexes
private java.lang.Object[]
_values
(package private) static int
ARRAY_THRESHOLD
-
Fields inherited from interface com.strobel.componentmodel.FrugalKeyMap
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ArrayKeyMap(int[] keyIndexes, java.lang.Object[] values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> V
get(Key<V> key)
boolean
isEmpty()
<V> FrugalKeyMap
minus(Key<V> key)
<V> FrugalKeyMap
plus(Key<V> key, V value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.strobel.componentmodel.FrugalKeyMap
toString
-
-
-
-
Field Detail
-
ARRAY_THRESHOLD
static final int ARRAY_THRESHOLD
- See Also:
- Constant Field Values
-
_keyIndexes
private final int[] _keyIndexes
-
_values
private final java.lang.Object[] _values
-
-
Method Detail
-
plus
@NotNull public final <V> FrugalKeyMap plus(@NotNull Key<V> key, @NotNull V value)
- Specified by:
plus
in interfaceFrugalKeyMap
-
minus
@NotNull public final <V> FrugalKeyMap minus(@NotNull Key<V> key)
- Specified by:
minus
in interfaceFrugalKeyMap
-
get
public final <V> V get(@NotNull Key<V> key)
- Specified by:
get
in interfaceFrugalKeyMap
-
isEmpty
public final boolean isEmpty()
- Specified by:
isEmpty
in interfaceFrugalKeyMap
-
-