gnu.lists

Interface Sequence

public interface Sequence extends 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 intATTRIBUTE_VALUE
static intBOOLEAN_VALUE
static intCDATA_VALUE
static intCHAR_VALUE
static intCOMMENT_VALUE
static intDOCUMENT_VALUE
static intDOUBLE_VALUE
Return code used to indicate next element is 64-bit double.
static ObjecteofValue
Special magic end-of-file marker.
static intELEMENT_VALUE
static intEOF_VALUE
Return code used to indicate a position is at end of the sequence.
static intFLOAT_VALUE
Return code used to indicate next element is 32-bit float.
static intINT_S16_VALUE
static intINT_S32_VALUE
static intINT_S64_VALUE
static intINT_S8_VALUE
static intINT_U16_VALUE
static intINT_U32_VALUE
static intINT_U64_VALUE
static intINT_U8_VALUE
static intOBJECT_VALUE
static intPRIM_VALUE
static intPROCESSING_INSTRUCTION_VALUE
static intTEXT_BYTE_VALUE
A byte in an encoded string.
Method Summary
Enumerationelements()
voidfill(Object value)
Objectget(int index)
See java.util.List.
booleanisEmpty()
True is this sequence contains no elements.
Objectset(int index, Object value)
See java.util.List.
intsize()
See java.util.List.

Field Detail

ATTRIBUTE_VALUE

public static final int ATTRIBUTE_VALUE

BOOLEAN_VALUE

public static final int BOOLEAN_VALUE

CDATA_VALUE

public static final int CDATA_VALUE

CHAR_VALUE

public static final int CHAR_VALUE

COMMENT_VALUE

public static final int COMMENT_VALUE

DOCUMENT_VALUE

public static final int DOCUMENT_VALUE

DOUBLE_VALUE

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

eofValue

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

ELEMENT_VALUE

public static final int ELEMENT_VALUE

EOF_VALUE

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

FLOAT_VALUE

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

INT_S16_VALUE

public static final int INT_S16_VALUE

INT_S32_VALUE

public static final int INT_S32_VALUE

INT_S64_VALUE

public static final int INT_S64_VALUE

INT_S8_VALUE

public static final int INT_S8_VALUE

INT_U16_VALUE

public static final int INT_U16_VALUE

INT_U32_VALUE

public static final int INT_U32_VALUE

INT_U64_VALUE

public static final int INT_U64_VALUE

INT_U8_VALUE

public static final int INT_U8_VALUE

OBJECT_VALUE

public static final int OBJECT_VALUE

PRIM_VALUE

public static final int PRIM_VALUE

PROCESSING_INSTRUCTION_VALUE

public static final int PROCESSING_INSTRUCTION_VALUE

TEXT_BYTE_VALUE

public 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.

Method Detail

elements

public Enumeration elements()

fill

public void fill(Object value)

get

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

isEmpty

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

set

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

size

public int size()
See java.util.List.