org.jrdf.graph.mem
Class AbstractUnorderedContainer

java.lang.Object
  extended byorg.jrdf.graph.mem.AbstractUnorderedContainer
All Implemented Interfaces:
Collection, Container
Direct Known Subclasses:
AlternativeImpl, BagImpl

public abstract class AbstractUnorderedContainer
extends Object
implements Container

The base class for the implementation of Bag and Alternative.

Version:
$Revision: 1.1 $
Author:
Andrew Newman

Constructor Summary
AbstractUnorderedContainer()
           
 
Method Summary
 boolean add(Object o)
          
 void clear()
           
 boolean contains(Object o)
           
abstract  boolean equals(Object o)
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object o)
          
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
addAll, containsAll, removeAll, retainAll
 

Constructor Detail

AbstractUnorderedContainer

public AbstractUnorderedContainer()
Method Detail

size

public int size()
Specified by:
size in interface Collection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection

iterator

public Iterator iterator()
Specified by:
iterator in interface Collection

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection

toArray

public Object[] toArray(Object[] a)
Specified by:
toArray in interface Collection

add

public boolean add(Object o)
            throws IllegalArgumentException
Description copied from interface: Container

Specified by:
add in interface Container
Parameters:
o -
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

remove

public boolean remove(Object o)
               throws IllegalArgumentException
Description copied from interface: Container

Specified by:
remove in interface Container
Parameters:
o -
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.

clear

public void clear()
Specified by:
clear in interface Collection

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection

equals

public abstract boolean equals(Object o)
Specified by:
equals in interface Collection