org.jrdf.graph
Interface Container

All Superinterfaces:
Collection
All Known Subinterfaces:
Alternative, Bag, Sequence
All Known Implementing Classes:
AbstractUnorderedContainer, AlternativeImpl, BagImpl, SequenceImpl

public interface Container
extends Collection

A Container is a grouping of statements. A container can either be a Alternative, Bag, or Sequence. See 4.1 RDF Containers. Alternatives are unordered lists that do not allow duplicates. Bags are unordered lists that allow duplicates. Sequences are ordered lists that allows duplicates. Currently, this is just an extension of java.util.Collection that throws exceptions when inappropriate objects are used, for example non-ObjectNodes are added.

Version:
$Revision: 1.1 $
Author:
Andrew Newman

Method Summary
 boolean add(Object o)
          
 boolean remove(Object o)
          
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 

Method Detail

add

public boolean add(Object o)
            throws IllegalArgumentException

Specified by:
add in interface Collection
Parameters:
o -
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
Parameters:
o -
Throws:
IllegalArgumentException - if the given object is not the correct type, ObjectNode.