|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--Opus5.Array
An array of Objects.
| Field Summary | |
protected int |
base
The index of the first array element. |
protected java.lang.Object[] |
data
The array elements. |
| Constructor Summary | |
Array()
Constructs an Array of length zero with base zero. |
|
Array(int n)
Constructs an Array with the specified length. |
|
Array(int n,
int m)
Constructs an Array with the specified length and base. |
|
| Method Summary | |
void |
assign(Array array)
Assigns the value of the specified array to this array. |
java.lang.Object |
get(int position)
Returns the array element at the specified position. |
int |
getBase()
Returns the base of this array. |
java.lang.Object[] |
getData()
Returns the data field. |
int |
getLength()
Returns the length of this array. |
void |
put(int position,
java.lang.Object object)
Stores the specified object in this array at the specified position. |
void |
setBase(int base)
Sets the base of this array to the specified value. |
void |
setLength(int newLength)
Sets the length of this array to the specified value. |
java.lang.String |
toString()
Returns a string representation of this array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Object[] data
protected int base
| Constructor Detail |
public Array(int n,
int m)
Array with the specified length and base.n - The desired length.m - The desired base.public Array()
Array of length zero with base zero.public Array(int n)
Array with the specified length.n - The desired length.| Method Detail |
public void assign(Array array)
array - The desired array value.public java.lang.Object[] getData()
data field.data field.public int getBase()
public int getLength()
public java.lang.Object get(int position)
position - The position of the desired element.
public void put(int position,
java.lang.Object object)
position - The position of the desired element.public void setBase(int base)
base - The desired base.public void setLength(int newLength)
newLength - The desired length.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||