T - the type of stored data in the arraypublic class DynamicArray<T>
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
DynamicArray(int[] tableSizes,
T[] data)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
T |
get(int... position)
This method returns a value on the specified position in multidimensional array.
|
T |
get(int position)
This method returns a value on the specified position.
|
int |
getTotalSize()
This method returns the total amount of data stored in the array.
|
java.lang.String |
toString() |
public DynamicArray(int[] tableSizes,
T[] data)
tableSizes - the sizes of the tablejava.lang.IllegalArgumentException - an exception is thrown if one of the sizes is not a positive numberpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic T get(int position)
position - the position of the datapublic T get(int... position)
position - the position of the data indices of data positionpublic int getTotalSize()
public java.lang.String toString()
toString in class java.lang.Object