org.jrdf.graph.mem
Class SequenceImpl

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<ObjectNode>
              extended by org.jrdf.graph.mem.SequenceImpl
All Implemented Interfaces:
Serializable, Cloneable, Iterable<ObjectNode>, Collection<ObjectNode>, List<ObjectNode>, RandomAccess, Container<ObjectNode>, Sequence<ObjectNode>

public final class SequenceImpl
extends ArrayList<ObjectNode>
implements Sequence<ObjectNode>

An implementation of Sequence.

Version:
$Revision: 1045 $
Author:
Andrew Newman
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SequenceImpl()
           
 
Method Summary
 boolean contains(Object o)
          
 boolean containsAll(Collection<?> c)
          
 int indexOf(Object o)
          
 int lastIndexOf(Object o)
          
 ObjectNode remove()
          Removes the first element in the list (in a FIFO manner).
 boolean removeAll(Collection<?> c)
          
 boolean retainAll(Collection<?> c)
          
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, ensureCapacity, get, isEmpty, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.Sequence
add, addAll, get, listIterator, listIterator, remove, set, subList
 
Methods inherited from interface org.jrdf.graph.Container
add, addAll, iterator, remove, toArray
 
Methods inherited from interface java.util.List
add, addAll, clear, equals, hashCode, isEmpty, iterator, remove, size, toArray, toArray
 

Constructor Detail

SequenceImpl

public SequenceImpl()
Method Detail

remove

public ObjectNode remove()
Description copied from interface: Sequence
Removes the first element in the list (in a FIFO manner).

Specified by:
remove in interface Sequence<ObjectNode>
Returns:
the ObjectNode that was at the start of the list.

contains

public boolean contains(Object o)
Description copied from interface: Container

Specified by:
contains in interface Collection<ObjectNode>
Specified by:
contains in interface List<ObjectNode>
Specified by:
contains in interface Container<ObjectNode>
Overrides:
contains in class ArrayList<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

containsAll

public boolean containsAll(Collection<?> c)
Description copied from interface: Container

Specified by:
containsAll in interface Collection<ObjectNode>
Specified by:
containsAll in interface List<ObjectNode>
Specified by:
containsAll in interface Container<ObjectNode>
Overrides:
containsAll in class AbstractCollection<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, Sequence.

indexOf

public int indexOf(Object o)
            throws IllegalArgumentException
Description copied from interface: Sequence

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

lastIndexOf

public int lastIndexOf(Object o)
                throws IllegalArgumentException
Description copied from interface: Sequence

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

removeAll

public boolean removeAll(Collection<?> c)
                  throws IllegalArgumentException
Description copied from interface: Container

Specified by:
removeAll in interface Collection<ObjectNode>
Specified by:
removeAll in interface List<ObjectNode>
Specified by:
removeAll in interface Container<ObjectNode>
Overrides:
removeAll in class AbstractCollection<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, Sequence.

retainAll

public boolean retainAll(Collection<?> c)
                  throws IllegalArgumentException
Description copied from interface: Container

Specified by:
retainAll in interface Collection<ObjectNode>
Specified by:
retainAll in interface List<ObjectNode>
Specified by:
retainAll in interface Container<ObjectNode>
Overrides:
retainAll in class AbstractCollection<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, Sequence.