|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.container.MultiDimensionalArray<E>
public class MultiDimensionalArray<E>
This class fills the need to create a arbitraty multi-dimensional array structure.
Constructor Summary | |
---|---|
MultiDimensionalArray()
|
|
MultiDimensionalArray(int... dimensions)
|
Method Summary | ||
---|---|---|
Array |
get(int index)
Get the element at the provided index. |
|
E |
getElement(int... indicies)
Get the element located at the provided indicies. |
|
|
set(T array,
int index)
Set the element at index . |
|
void |
setElement(E element,
int... indicies)
Set the element at the provided index. |
|
int |
size()
Obtain the current size of the array structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiDimensionalArray()
public MultiDimensionalArray(int... dimensions)
Method Detail |
---|
public int size()
Array
size
in interface Array
public Array get(int index)
Array
get
in interface Array
index
- The index of the desired element.
index
, if available.public <T> void set(T array, int index)
Array
index
.
set
in interface Array
T
- The generic type.array
- The object to place within the array.index
- The index to set the object at.public void setElement(E element, int... indicies)
element
- The element to set at the given index position.indicies
- The indicies to follow.public E getElement(int... indicies)
indicies
- The list of indecies to follow to obtain the desired element.
IndexOutOfBoundsException
- if an index is larger that a sub-array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |