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[]_keyIndexesprivate java.lang.Object[]_values(package private) static intARRAY_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> Vget(Key<V> key)booleanisEmpty()<V> FrugalKeyMapminus(Key<V> key)<V> FrugalKeyMapplus(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:
plusin interfaceFrugalKeyMap
-
minus
@NotNull public final <V> FrugalKeyMap minus(@NotNull Key<V> key)
- Specified by:
minusin interfaceFrugalKeyMap
-
get
public final <V> V get(@NotNull Key<V> key)
- Specified by:
getin interfaceFrugalKeyMap
-
isEmpty
public final boolean isEmpty()
- Specified by:
isEmptyin interfaceFrugalKeyMap
-
-