| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiitb.con.util.Unbound2DIntArray
public class Unbound2DIntArray
Unbound 2d integer array with two columns
| Field Summary | |
|---|---|
|  int | lengthThe number of values currently present in the array. | 
| Constructor Summary | |
|---|---|
| Unbound2DIntArray(int size,
                                   int cols)Constructor with full specification. | |
| Method Summary | |
|---|---|
|  int | add(int... values)Add a value to the array, appending it after the current values. | 
|  void | clear()Set the array to the empty state. | 
|  void | dump()Prints the contents of the array | 
|  void | ensureCapacity(int min)Ensure that the array has the capacity for at least the specified number of values. | 
|  int[] | get(int index)Retrieve the value present at an index position in the array. | 
|  void | set(int index,
       int... values)Set the value at an index position in the array. | 
|  int | size()Get the number of values currently present in the array. | 
|  int[][] | toArray()Constructs and returns a simple array containing the same data as held in this growable array. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public int length
| Constructor Detail | 
|---|
public Unbound2DIntArray(int size,
                         int cols)
size - number of int values initially allowed in arraycols - number of columns| Method Detail | 
|---|
public final int add(int... values)
values - value to be added
public final void clear()
public void dump()
public final void ensureCapacity(int min)
min - minimum capacity to be guaranteedpublic final int[] get(int index)
index - index position for value to be retrieved
public final void set(int index,
                      int... values)
index - index position to be setvalues - value to be setpublic final int size()
public int[][] toArray()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||