gnu.lists
Interface Sequence

All Superinterfaces:
java.util.Collection, Consumable, java.lang.Iterable, java.util.List
All Known Subinterfaces:
CharSeq
All Known Implementing Classes:
BitVector, Buffer, BufferContent, CharBuffer, F32Vector, F64Vector, FString, FVector, GapVector, GeneralArray1, LineOffsets, LList, Pair, PairWithPosition, S16Vector, S32Vector, S64Vector, S8Vector, SimpleVector, StableVector, SubCharSeq, SubSequence, SwingBuffer, SwtBuffer, SwtCharBuffer, U16Vector, U32Vector, U64Vector, U8Vector, ValueStack

public interface Sequence
extends java.util.List, Consumable

A Sequence is an ordered list of elements. It is similar to and compatible with the Java2 java.util.List interface, but does not require it. All standard classes that implement Sequence also extend AbstractSequence. Using AbstractSequence provides default implementations for many methods, and also makes things a bit more efficient. However, client code should use Sequence rather than AbstractSequence.


Field Summary
static int ATTRIBUTE_VALUE
           
static int BOOLEAN_VALUE
           
static int CDATA_VALUE
           
static int CHAR_VALUE
           
static int COMMENT_VALUE
           
static int DOCUMENT_VALUE
           
static int DOUBLE_VALUE
          Return code used to indicate next element is 64-bit double.
static int ELEMENT_VALUE
           
static int EOF_VALUE
          Return code used to indicate a position is at end of the sequence.
static java.lang.Object eofValue
          Special magic end-of-file marker.
static int FLOAT_VALUE
          Return code used to indicate next element is 32-bit float.
static int INT_S16_VALUE
           
static int INT_S32_VALUE
           
static int INT_S64_VALUE
           
static int INT_S8_VALUE
           
static int INT_U16_VALUE
           
static int INT_U32_VALUE
           
static int INT_U64_VALUE
           
static int INT_U8_VALUE
           
static int OBJECT_VALUE
           
static int PRIM_VALUE
           
static int PROCESSING_INSTRUCTION_VALUE
           
static int TEXT_BYTE_VALUE
          A byte in an encoded string.
 
Method Summary
 java.util.Enumeration elements()
           
 void fill(java.lang.Object value)
           
 java.lang.Object get(int index)
          See java.util.List.
 boolean isEmpty()
          True is this sequence contains no elements.
 java.lang.Object set(int index, java.lang.Object value)
          See java.util.List.
 int size()
          See java.util.List.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, subList, toArray, toArray
 
Methods inherited from interface gnu.lists.Consumable
consume
 

Field Detail

eofValue

static final java.lang.Object eofValue
Special magic end-of-file marker.


EOF_VALUE

static final int EOF_VALUE
Return code used to indicate a position is at end of the sequence.

See Also:
Constant Field Values

PRIM_VALUE

static final int PRIM_VALUE
See Also:
Constant Field Values

INT_U8_VALUE

static final int INT_U8_VALUE
See Also:
Constant Field Values

INT_S8_VALUE

static final int INT_S8_VALUE
See Also:
Constant Field Values

INT_U16_VALUE

static final int INT_U16_VALUE
See Also:
Constant Field Values

INT_S16_VALUE

static final int INT_S16_VALUE
See Also:
Constant Field Values

INT_U32_VALUE

static final int INT_U32_VALUE
See Also:
Constant Field Values

INT_S32_VALUE

static final int INT_S32_VALUE
See Also:
Constant Field Values

INT_U64_VALUE

static final int INT_U64_VALUE
See Also:
Constant Field Values

INT_S64_VALUE

static final int INT_S64_VALUE
See Also:
Constant Field Values

FLOAT_VALUE

static final int FLOAT_VALUE
Return code used to indicate next element is 32-bit float.

See Also:
Constant Field Values

DOUBLE_VALUE

static final int DOUBLE_VALUE
Return code used to indicate next element is 64-bit double.

See Also:
Constant Field Values

BOOLEAN_VALUE

static final int BOOLEAN_VALUE
See Also:
Constant Field Values

TEXT_BYTE_VALUE

static final int TEXT_BYTE_VALUE
A byte in an encoded string. Part of a char, in contrast with INT_S8_VALUE, which is an integer.

See Also:
Constant Field Values

CHAR_VALUE

static final int CHAR_VALUE
See Also:
Constant Field Values

CDATA_VALUE

static final int CDATA_VALUE
See Also:
Constant Field Values

OBJECT_VALUE

static final int OBJECT_VALUE
See Also:
Constant Field Values

ELEMENT_VALUE

static final int ELEMENT_VALUE
See Also:
Constant Field Values

DOCUMENT_VALUE

static final int DOCUMENT_VALUE
See Also:
Constant Field Values

ATTRIBUTE_VALUE

static final int ATTRIBUTE_VALUE
See Also:
Constant Field Values

COMMENT_VALUE

static final int COMMENT_VALUE
See Also:
Constant Field Values

PROCESSING_INSTRUCTION_VALUE

static final int PROCESSING_INSTRUCTION_VALUE
See Also:
Constant Field Values
Method Detail

isEmpty

boolean isEmpty()
True is this sequence contains no elements.

Specified by:
isEmpty in interface java.util.Collection
Specified by:
isEmpty in interface java.util.List

size

int size()
See java.util.List.

Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List

get

java.lang.Object get(int index)
See java.util.List.

Specified by:
get in interface java.util.List

set

java.lang.Object set(int index,
                     java.lang.Object value)
See java.util.List.

Specified by:
set in interface java.util.List

fill

void fill(java.lang.Object value)

elements

java.util.Enumeration elements()