|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.util.ImmutableArray2<K>
K - the typepublic final class ImmutableArray2<K>
An immutable array.
| Method Summary | ||
|---|---|---|
K[] |
array()
Get the data. |
|
static
|
create(K... array)
Create an immutable array. |
|
static
|
empty()
Get an empty immutable array. |
|
K |
get(int index)
Get the entry at this index. |
|
ImmutableArray2<K> |
insert(int index,
K obj)
Insert an entry at this index. |
|
java.util.Iterator<K> |
iterator()
Get an iterator over all entries. |
|
int |
length()
Get the length. |
|
ImmutableArray2<K> |
remove(int index)
Remove the entry at this index. |
|
ImmutableArray2<K> |
set(int index,
K obj)
Set the entry at this index. |
|
ImmutableArray2<K> |
subArray(int fromIndex,
int toIndex)
Get a sub-array. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public K get(int index)
index - the index
public int length()
public ImmutableArray2<K> set(int index,
K obj)
index - the indexobj - the object
public ImmutableArray2<K> insert(int index,
K obj)
index - the indexobj - the object
public ImmutableArray2<K> remove(int index)
index - the index
public ImmutableArray2<K> subArray(int fromIndex,
int toIndex)
fromIndex - the index of the first entrytoIndex - the end index, plus one
public static <K> ImmutableArray2<K> create(K... array)
array - the data
public K[] array()
public java.lang.String toString()
toString in class java.lang.Objectpublic static <K> ImmutableArray2<K> empty()
K - the key type
public java.util.Iterator<K> iterator()
iterator in interface java.lang.Iterable<K>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||