org.jtiger.framework
Interface ReadOnlyArray<E>

All Superinterfaces:
Cloneable, Iterable<E>, Serializable
All Known Subinterfaces:
Sequence<E>

public interface ReadOnlyArray<E>
extends Iterable<E>, Cloneable, Serializable

A wrapper type typically backed by an array that provides read-only access to the elements of the array.

Version:
2.1
Build Number 0376
Build Time 2006-07-28 01:50.16.218 CET (GMT + 1)
Author:
Tony Morris
See Also:
SequenceFactory

Method Summary
 ReadOnlyArray<E> clone()
          Returns a clone of this ReadOnlyArray which is backed by a cloned array.
 E get(int index)
          Returns the element at the given index in the underlying array.
 int length()
          Returns the number of elements held in this structure.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

get

E get(int index)
      throws ArrayIndexOutOfBoundsException
Returns the element at the given index in the underlying array.

Parameters:
index - The index of the element to return.
Returns:
The element at the specified index.
Throws:
ArrayIndexOutOfBoundsException - If the given index is out of range (index < 0 || index >= length()).

length

int length()
Returns the number of elements held in this structure.

Returns:
The number of elements held in this structure.

clone

ReadOnlyArray<E> clone()
Returns a clone of this ReadOnlyArray which is backed by a cloned array.

Returns:
A clone of this ReadOnlyArray which is backed by a cloned array.