org.jrdf.graph.mem
Class AlternativeImpl

java.lang.Object
  extended by org.jrdf.graph.mem.AbstractUnorderedContainer<ObjectNode>
      extended by org.jrdf.graph.mem.AlternativeImpl
All Implemented Interfaces:
Iterable<ObjectNode>, Collection<ObjectNode>, Alternative<ObjectNode>, Container<ObjectNode>

public final class AlternativeImpl
extends AbstractUnorderedContainer<ObjectNode>
implements Alternative<ObjectNode>

An implementation of Alternative.

Version:
$Revision: 1045 $
Author:
Andrew Newman

Field Summary
 
Fields inherited from class org.jrdf.graph.mem.AbstractUnorderedContainer
elements, key
 
Constructor Summary
AlternativeImpl()
           
 
Method Summary
 boolean add(ObjectNode o)
          
 boolean addAll(Collection<? extends ObjectNode> c)
          
 boolean containsAll(Collection<?> c)
          
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean removeAll(Collection<?> c)
          
 boolean retainAll(Collection<?> c)
          
 
Methods inherited from class org.jrdf.graph.mem.AbstractUnorderedContainer
clear, contains, isEmpty, iterator, remove, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.Container
contains, iterator, remove, toArray
 
Methods inherited from interface java.util.Collection
clear, isEmpty, size, toArray
 

Constructor Detail

AlternativeImpl

public AlternativeImpl()
Method Detail

containsAll

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

Specified by:
containsAll in interface Collection<ObjectNode>
Specified by:
containsAll in interface Container<ObjectNode>

add

public boolean add(ObjectNode o)
Description copied from interface: Container

Specified by:
add in interface Collection<ObjectNode>
Specified by:
add in interface Container<ObjectNode>
Overrides:
add in class AbstractUnorderedContainer<ObjectNode>
Parameters:
o - Add an ObjectNode.
Returns:

addAll

public boolean addAll(Collection<? extends ObjectNode> c)
               throws IllegalArgumentException
Description copied from interface: Alternative

Specified by:
addAll in interface Collection<ObjectNode>
Specified by:
addAll in interface Alternative<ObjectNode>
Specified by:
addAll in interface Container<ObjectNode>
Parameters:
c -
Throws:
IllegalArgumentException - if the given object is not the correct type, Alternative.

removeAll

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

Specified by:
removeAll in interface Collection<ObjectNode>
Specified by:
removeAll in interface Container<ObjectNode>

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 Container<ObjectNode>
Throws:
IllegalArgumentException - if the given object is not the correct type, Sequence.

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<ObjectNode>
Overrides:
hashCode in class AbstractUnorderedContainer<ObjectNode>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<ObjectNode>
Specified by:
equals in class AbstractUnorderedContainer<ObjectNode>