|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.bali.share.collection.ImmutableArray
ImmutableArray
acts as an immutable array of
objects. That is to say, that the elements of the Immutable
array will always refer to the same set of objects. There
is nothing to prevent the state of the objects referred to by the
ImmutableArray from changing.
Constructor Summary | |
ImmutableArray()
Creates an zero length ImmutableArray. |
|
ImmutableArray(java.util.Enumeration enumeration)
Creates an ImmutableArray from an Enumeration of objects. |
|
ImmutableArray(java.lang.Object[] array)
Creates an ImmutableArray from a standard array of objects. |
|
ImmutableArray(java.util.Vector vector)
Creates an ImmutableArray from a Vector of objects. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Compares the specified object with this array for equality. |
java.lang.Object |
get(int index)
Retrieves an object from the array. |
int |
hashCode()
Returns the hash code value for this array. |
int |
size()
Returns the number of elements in the array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImmutableArray()
public ImmutableArray(java.lang.Object[] array)
array
- Array of Objects used to initialize the array.public ImmutableArray(java.util.Vector vector)
array
- Vector of objects used to initialize the array.public ImmutableArray(java.util.Enumeration enumeration)
enumeration
- Enumeration of Objects to initialize the array.Method Detail |
public java.lang.Object get(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- Index of the desired element.java.lang.ArrayIndexOutOfBoundsException
- If index is out of boundspublic int size()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to be compared for equality with this array.public int hashCode()
hashCode
in class java.lang.Object
|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |