org.jrdf.graph.mem
Class CollectionImpl

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.AbstractSequentialList
              extended byjava.util.LinkedList
                  extended byorg.jrdf.graph.mem.CollectionImpl
All Implemented Interfaces:
Cloneable, Collection, Collection, List, Serializable

public class CollectionImpl
extends LinkedList
implements Collection

A Collection all the statements of a particular group.

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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CollectionImpl()
          {@inheritDoc}
 
Method Summary
 void add(int index, Object element)
          Add an $ObjectNode to the collection at the given position.
 boolean add(Object o)
          Add an $ObjectNode to the collection.
 boolean addAll(Collection c)
          Add a collection of $ObjectNodes to this one.
 boolean addAll(int index, Collection c)
          Add a collection of $ObjectNodes to this one starting at the given index.
 void addFirst(Object o)
          Add an $ObjectNode to the start of the collection.
 void addLast(Object o)
           
 boolean contains(Object o)
          Search the collection and return if the object was found or not.
 boolean containsAll(Collection c)
          Search the collection and return if all of the given objects were found.
 int indexOf(Object o)
           
 int lastIndexOf(Object o)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
 Object set(int index, Object element)
           
 
Methods inherited from class java.util.LinkedList
clear, clone, get, getFirst, getLast, listIterator, remove, removeFirst, removeLast, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.Collection
iterator
 
Methods inherited from interface java.util.List
equals, hashCode, isEmpty, iterator, listIterator, subList
 

Constructor Detail

CollectionImpl

public CollectionImpl()
{@inheritDoc}

Method Detail

add

public void add(int index,
                Object element)
         throws IllegalArgumentException
Description copied from interface: Collection
Add an $ObjectNode to the collection at the given position.

Specified by:
add in interface Collection
Throws:
IllegalArgumentException

add

public boolean add(Object o)
            throws IllegalArgumentException
Description copied from interface: Collection
Add an $ObjectNode to the collection.

Specified by:
add in interface Collection
Throws:
IllegalArgumentException

addAll

public boolean addAll(Collection c)
               throws IllegalArgumentException
Description copied from interface: Collection
Add a collection of $ObjectNodes to this one.

Specified by:
addAll in interface Collection
Throws:
IllegalArgumentException

addAll

public boolean addAll(int index,
                      Collection c)
               throws IllegalArgumentException
Description copied from interface: Collection
Add a collection of $ObjectNodes to this one starting at the given index.

Specified by:
addAll in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, Collection.

addFirst

public void addFirst(Object o)
Description copied from interface: Collection
Add an $ObjectNode to the start of the collection.

Specified by:
addFirst in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

addLast

public void addLast(Object o)
Specified by:
addLast in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

contains

public boolean contains(Object o)
Description copied from interface: Collection
Search the collection and return if the object was found or not.

Specified by:
contains in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

indexOf

public int indexOf(Object o)
            throws IllegalArgumentException
Specified by:
indexOf in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

lastIndexOf

public int lastIndexOf(Object o)
                throws IllegalArgumentException
Specified by:
lastIndexOf in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

remove

public boolean remove(Object o)
               throws IllegalArgumentException
Specified by:
remove in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type.

containsAll

public boolean containsAll(Collection c)
Description copied from interface: Collection
Search the collection and return if all of the given objects were found.

Specified by:
containsAll in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, Collection.

removeAll

public boolean removeAll(Collection c)
                  throws IllegalArgumentException
Specified by:
removeAll in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, Collection.

retainAll

public boolean retainAll(Collection c)
                  throws IllegalArgumentException
Specified by:
retainAll in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, Collection.

set

public Object set(int index,
                  Object element)
           throws IllegalArgumentException
Specified by:
set in interface Collection
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.