net.sf.tuplespace
Interface Tuple

All Known Implementing Classes:
SimpleTuple

public interface Tuple

Tuples are objects that hold other objects.

Tuples are similar in concept to arrays, especially Java arrays, as they can be an arbitrary length, and can contain any kind of objects.


Method Summary
 Object getValueAt(int index)
          Returns the object held at index index in the tuple.
 int length()
          Returns the length of this tuple.
 

Method Detail

length

public int length()
Returns the length of this tuple.

Returns:
The length of the tuple.

getValueAt

public Object getValueAt(int index)
                  throws IllegalArgumentException
Returns the object held at index index in the tuple.

Parameters:
index - The object's index, from 0 to length()-1.
Returns:
The object held at index index.
Throws:
IllegalArgumentException - If index is out of range.