|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Indexable
Read-only interface for indexed containers.
This interface should be implemented by a class that contains a
group of (typed) elements and allows at least read-only access to
these elements by an integer index (from 0
to
length() - 1
, inclusive).
Method Summary | |
---|---|
java.lang.Object |
getAt(int index)
Returns value of the element at the specified index. |
int |
length()
Returns the number of elements in this container. |
Method Detail |
---|
int length()
this
container.
This method should not be final
.
getAt(int)
java.lang.Object getAt(int index) throws java.lang.ArrayIndexOutOfBoundsException
final
.
index
- the index (must be in the range) at which to return an element.
null
) at index.
java.lang.ArrayIndexOutOfBoundsException
- if index is negative or is not less than
length()
.
java.lang.OutOfMemoryError
- if there is not enough memory.length()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |