|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--step.StepArray
Implementation for arrays of STEP objects.
Field Summary | |
static FieldDef |
ELEMENT_FIELD
The prototype definition for the element fields of array objects. |
static FieldDef |
LENGTH_FIELD
The prototype definition for the length field of array objects. |
Fields inherited from interface step.StepObject |
TYPE |
Constructor Summary | |
StepArray(Collection elements)
Create a new STEP array from a collection of objects. |
|
StepArray(StepObject[] elements)
Create a new STEP array. |
Method Summary | |
boolean |
equals(Object o)
Compare two array objects for equality. |
StepObject[] |
getElements()
Get the underlying array of elements. |
int |
hashCode()
Get the hash-code for this object. |
Iterator |
iterator()
Get an iterator over the elements of this array. |
int |
length()
Get the length of this array. |
String |
toString()
Get a string representation of this array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final FieldDef LENGTH_FIELD
public static final FieldDef ELEMENT_FIELD
Constructor Detail |
public StepArray(StepObject[] elements)
NOTE: The element values are assumed to be non-null.
public StepArray(Collection elements)
NOTE: The given collection is assumed to contain objects of the same type.
ClassCastException
- if an element is not a StepObject
.Method Detail |
public StepObject[] getElements()
public int length()
public Iterator iterator()
public boolean equals(Object o)
The objects are equivalent if they are the same size and contain the same data values.
The algorithm is fail-fast.
equals
in interface StepObject
equals
in class Object
public int hashCode()
for (i=0; i<value.length; i++) code = (code << 1) ^ (hashCode[i]);
hashCode
in interface StepObject
hashCode
in class Object
public String toString()
toString()
.
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |