|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.common.AbstractJImmutableArray<T>
@Immutable public abstract class AbstractJImmutableArray<T>
Constructor Summary | |
---|---|
AbstractJImmutableArray()
|
Method Summary | |
---|---|
Holder<JImmutableMap.Entry<Integer,T>> |
findEntry(int key)
Search for an Entry within the map and return a Holder indicating if the Entry was found and, if it was found, the Entry itself. |
T |
get(int index)
Return the value associated with index or null if no value is associated. |
Map<Integer,T> |
getMap()
Creates an unmodifiable java.util.Map reflecting the values of this PersistentMap. |
Insertable<JImmutableMap.Entry<Integer,T>> |
insert(JImmutableMap.Entry<Integer,T> e)
Adds the key/value pair to this map. |
boolean |
isEmpty()
|
Iterator<JImmutableMap.Entry<Integer,T>> |
iterator()
|
Cursor<Integer> |
keysCursor()
Creates a Cursor to access all of the Map's keys. |
Cursor<T> |
valuesCursor()
Creates a Cursor to access all of the Map's values. |
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 |
---|
assign, delete, deleteAll, find, getValueOr, size |
Methods inherited from interface org.javimmutable.collections.Cursorable |
---|
cursor |
Constructor Detail |
---|
public AbstractJImmutableArray()
Method Detail |
---|
@Nullable public T get(int index)
JImmutableArray
get
in interface Indexed<T>
get
in interface JImmutableArray<T>
index
- identifies the value to retrieve
@Nonnull public Holder<JImmutableMap.Entry<Integer,T>> findEntry(int key)
JImmutableArray
findEntry
in interface JImmutableArray<T>
key
- index to search for
public boolean isEmpty()
isEmpty
in interface JImmutableArray<T>
@Nonnull public Insertable<JImmutableMap.Entry<Integer,T>> insert(@Nullable JImmutableMap.Entry<Integer,T> e)
insert
in interface Insertable<JImmutableMap.Entry<Integer,T>>
e
-
@Nonnull public Cursor<Integer> keysCursor()
JImmutableArray
keysCursor
in interface JImmutableArray<T>
@Nonnull public Cursor<T> valuesCursor()
JImmutableArray
valuesCursor
in interface JImmutableArray<T>
public Iterator<JImmutableMap.Entry<Integer,T>> iterator()
iterator
in interface Iterable<JImmutableMap.Entry<Integer,T>>
@Nonnull public Map<Integer,T> getMap()
JImmutableArray
getMap
in interface JImmutableArray<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |