org.jrdf.graph
Interface Sequence<ObjectNode>

All Superinterfaces:
Collection<ObjectNode>, Container<ObjectNode>, Iterable<ObjectNode>, List<ObjectNode>
All Known Implementing Classes:
SequenceImpl

public interface Sequence<ObjectNode>
extends Container<ObjectNode>, List<ObjectNode>

A Sequence is a group of statements that are kept in an orderd list. The order in which the objects go in dictates how they are returned in a First In, First Out manner.

Version:
$Revision: 1045 $
Author:
Andrew Newman

Method Summary
 void add(int index, ObjectNode o)
          
 boolean addAll(int index, Collection<? extends ObjectNode> c)
          
 ObjectNode get(int index)
          
 int indexOf(Object o)
          
 int lastIndexOf(Object o)
          
 ListIterator<ObjectNode> listIterator()
          
 ListIterator<ObjectNode> listIterator(int index)
          
 ObjectNode remove()
          Removes the first element in the list (in a FIFO manner).
 ObjectNode remove(int index)
          
 ObjectNode set(int index, ObjectNode element)
          
 List<ObjectNode> subList(int fromIndex, int toIndex)
          
 
Methods inherited from interface org.jrdf.graph.Container
add, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, toArray
 
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

add

void add(int index,
         ObjectNode o)

Specified by:
add in interface List<ObjectNode>
Parameters:
o - Add an ObjectNode.

addAll

boolean addAll(int index,
               Collection<? extends ObjectNode> c)

Specified by:
addAll in interface List<ObjectNode>

get

ObjectNode get(int index)

Specified by:
get in interface List<ObjectNode>
Parameters:
index -
Returns:

indexOf

int indexOf(Object o)
            throws IllegalArgumentException

Specified by:
indexOf in interface List<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

lastIndexOf

int lastIndexOf(Object o)
                throws IllegalArgumentException

Specified by:
lastIndexOf in interface List<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

listIterator

ListIterator<ObjectNode> listIterator()

Specified by:
listIterator in interface List<ObjectNode>
Returns:

listIterator

ListIterator<ObjectNode> listIterator(int index)

Specified by:
listIterator in interface List<ObjectNode>
Returns:

remove

ObjectNode remove()
Removes the first element in the list (in a FIFO manner).

Returns:
the ObjectNode that was at the start of the list.

remove

ObjectNode remove(int index)

Specified by:
remove in interface List<ObjectNode>
Parameters:
index -
Returns:
the ObjectNode at that position.

set

ObjectNode set(int index,
               ObjectNode element)
               throws IllegalArgumentException

Specified by:
set in interface List<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

subList

List<ObjectNode> subList(int fromIndex,
                         int toIndex)

Specified by:
subList in interface List<ObjectNode>
Parameters:
fromIndex -
toIndex -
Returns: