org.nodal.model
Interface Seq

All Known Subinterfaces:
BooleanSeq, ByteSeq, CharSeq, DoubleSeq, FloatSeq, IntSeq, LongSeq, ShortSeq

public interface Seq

Generic interface for accessing a sequence of things. This is used as an abstract interface for anything that can be indexed by an integer. It is mostly used as a liaison interface between sequences of particular type (accessible with the type()method) and various interfaces that can use arrays and other interfaces.

Author:
Lee Iverson
See Also:
SeqUtil

Nested Class Summary
static class Seq.SeqType
          A type-safe enum for identifying the type of a Seq object.
 
Method Summary
 java.lang.Object elementAt(int i)
          Access the element at index i.
 int size()
          The number of elements in the sequence.
 Seq.SeqType type()
          Return the SeqType enum that identifies this Seq instance's contents.
 

Method Detail

size

public int size()
The number of elements in the sequence.


elementAt

public java.lang.Object elementAt(int i)
Access the element at index i.


type

public Seq.SeqType type()
Return the SeqType enum that identifies this Seq instance's contents.

Returns:
the SeqType that identifies this Seq's contents.