|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.common.AbstractJImmutableArray<T>
org.javimmutable.collections.array.bit32.Bit32Array<T>
T
- @Immutable public abstract class Bit32Array<T>
JImmutableArray implementation that only accepts indexes in the range [0, 31].
Constructor Summary | |
---|---|
Bit32Array()
|
Method Summary | ||
---|---|---|
abstract Bit32Array<T> |
assign(int key,
T value)
Sets the value associated with a specific index. |
|
protected static void |
checkIndex(int index)
|
|
abstract Bit32Array<T> |
delete(int key)
Deletes the entry for the specified index (if any). |
|
JImmutableArray<T> |
deleteAll()
|
|
abstract int |
firstIndex()
|
|
T |
get(int index)
Return the value associated with index or null if no value is associated. |
|
static
|
of()
|
|
static
|
of(Indexed<T> source,
int offset,
int limit)
Constructor for efficiently creating a Bit32Array with consecutive indexes of up to 32 elements from an Indexed collection. |
|
static
|
of(int index,
T value)
Creates a new Bit32Array containing exactly one element. |
Methods inherited from class org.javimmutable.collections.common.AbstractJImmutableArray |
---|
findEntry, getMap, insert, isEmpty, iterator, keysCursor, valuesCursor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.javimmutable.collections.JImmutableArray |
---|
find, getValueOr, size |
Methods inherited from interface org.javimmutable.collections.Cursorable |
---|
cursor |
Constructor Detail |
---|
public Bit32Array()
Method Detail |
---|
public static <T> Bit32Array<T> of()
public static <T> Bit32Array<T> of(int index, T value)
T
- index
- value
-
public static <T> Bit32Array<T> of(Indexed<T> source, int offset, int limit)
T
- source
- offset
- limit
-
@Nonnull public abstract Bit32Array<T> assign(int key, @Nullable T value)
JImmutableArray
key
- indexvalue
- possibly null value
@Nonnull public abstract Bit32Array<T> delete(int key)
JImmutableArray
key
- index
public abstract int firstIndex()
@Nullable public T get(int index)
JImmutableArray
get
in interface Indexed<T>
get
in interface JImmutableArray<T>
get
in class AbstractJImmutableArray<T>
index
- identifies the value to retrieve
@Nonnull public JImmutableArray<T> deleteAll()
protected static void checkIndex(int index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |