org.javimmutable.collections
Interface Indexed<T>

Type Parameters:
T -
All Known Subinterfaces:
JImmutableArray<T>, JImmutableList<T>, JImmutableRandomAccessList<T>
All Known Implementing Classes:
AbstractJImmutableArray, Bit32Array, EmptyBit32Array, FullBit32Array, IndexedArray, IndexedList, JImmutableArrayList, JImmutableTreeList, SingleBit32Array, StandardBit32Array, TrieArray

public interface Indexed<T>

Interface for containers that allow access to values by an integer index.


Method Summary
 T get(int index)
          Retrieve the value.
 int size()
          Retrieve the number of values available in the container.
 

Method Detail

get

T get(int index)
Retrieve the value. The index must be valid for the container's current size (i.e. [0-size)

Parameters:
index -
Returns:
Throws:
IndexOutOfBoundsException - if index is out of bounds

size

int size()
Retrieve the number of values available in the container.

Returns:


Copyright © 2014 Burton Computer Corporation. All rights reserved.