|
||||||||||
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>
org.javimmutable.collections.array.bit32.SingleBit32Array<T>
@Immutable public class SingleBit32Array<T>
Method Summary | |
---|---|
Bit32Array<T> |
assign(int index,
T value)
Sets the value associated with a specific index. |
Cursor<JImmutableMap.Entry<Integer,T>> |
cursor()
|
Bit32Array<T> |
delete(int index)
Deletes the entry for the specified index (if any). |
Holder<T> |
find(int index)
Return a Holder containing the value associated wth the index or an empty Holder if no value is associated with the index. |
int |
firstIndex()
|
Integer |
getKey()
|
T |
getValue()
|
T |
getValueOr(int index,
T defaultValue)
Return the value associated with index or defaultValue if no value is associated. |
boolean |
isEmpty()
|
int |
size()
Return the number of entries in the map. |
Methods inherited from class org.javimmutable.collections.array.bit32.Bit32Array |
---|
checkIndex, deleteAll, get, of, of, of |
Methods inherited from class org.javimmutable.collections.common.AbstractJImmutableArray |
---|
findEntry, getMap, insert, iterator, keysCursor, valuesCursor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@Nullable public T getValueOr(int index, @Nullable T defaultValue)
JImmutableArray
getValueOr
in interface JImmutableArray<T>
index
- identifies the value to retrievedefaultValue
- value to return if no entry exists for index
@Nonnull public Holder<T> find(int index)
JImmutableArray
find
in interface JImmutableArray<T>
index
- identifies the value to retrieve
@Nonnull public Bit32Array<T> assign(int index, @Nullable T value)
JImmutableArray
assign
in interface JImmutableArray<T>
assign
in class Bit32Array<T>
index
- indexvalue
- possibly null value
@Nonnull public Bit32Array<T> delete(int index)
JImmutableArray
delete
in interface JImmutableArray<T>
delete
in class Bit32Array<T>
index
- index
public int size()
JImmutableArray
size
in interface Indexed<T>
size
in interface JImmutableArray<T>
public int firstIndex()
firstIndex
in class Bit32Array<T>
@Nonnull public Integer getKey()
getKey
in interface JImmutableMap.Entry<Integer,T>
public T getValue()
getValue
in interface JImmutableMap.Entry<Integer,T>
public boolean isEmpty()
isEmpty
in interface JImmutableArray<T>
isEmpty
in class AbstractJImmutableArray<T>
@Nonnull public Cursor<JImmutableMap.Entry<Integer,T>> cursor()
cursor
in interface Cursorable<JImmutableMap.Entry<Integer,T>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |