|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Object
IntArray
public class IntArray
This class implements an facade for int[].
Size of array is fixed and cannot be changed after it is created.
| Constructor Summary | |
|---|---|
IntArray(int length)
Creates a new int[] with specified length. |
|
| Method Summary | |
|---|---|
IntArray |
clear(int fill)
Fills the whole array with specified integer. |
int |
length()
Returns the length of this array. |
int |
operator_get(int index)
Returns the integer at specified index. |
int |
operator_set(int index,
int value)
Sets the integer at specified index. |
IntArray |
set$(int offset)
Sets multiple integers at once, starting from specified offset. |
IntArray |
setLength(int length)
Creates a new array with specified length. |
| Methods inherited from class Object |
|---|
toString, equals, hashCode |
| Methods inherited from |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntArray(int length)
int[] with specified length.
length - Length of array, must be >= 0| Method Detail |
|---|
public int operator_get(int index)
index - Index to array
public int operator_set(int index,
int value)
index - Index to arrayvalue - New value for index
public IntArray setLength(int length)
length - New length of array
public int length()
public IntArray clear(int fill)
fill - Filler integer
public IntArray set$(int offset)
int a = ...;
IntArray matrix =
new IntArray(9).set(0,, -a-1, -a, -a+1,
-1, 0, 1,
a-1, a, a+1);
offset - Offset to start setting from
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||