This class represents a unique index which can be used instead of java.lang.Integer
for primitive data types collections. For example:[code] class SparseVector
Unicity is guaranteed and direct equality (==
) can be used in place of object equality (Index.equals(Object)
).
Indices have no adverse effect on the garbage collector (persistent instances), but should not be used for large integer values as that would increase the permanent memory footprint significantly.
RTSJ: Instance of this classes are allocated in ImmortalMemory
. Indices can be pre-allocated at start-up to avoid run-time allocation delays by configuring {@link #INITIAL_FIRST} and/or {@link #INITIAL_LAST} or through {@link #setMinimumRange}.
|
|
|
|