org.ozoneDB.odmg
Class OzoneODMGDSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
              extended byorg.ozoneDB.odmg.OzoneODMGDSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, DCollection, DSet, java.io.Serializable, java.util.Set

public class OzoneODMGDSet
extends java.util.HashSet
implements DSet

Version:
$Revision: 1.1 $Date: 2001/12/18 10:31:31 $
Author:
SMB
See Also:
Serialized Form

Constructor Summary
OzoneODMGDSet()
           
OzoneODMGDSet(java.util.Collection _collection)
           
 
Method Summary
 DSet difference(DSet otherSet)
          Create a new DSet object that contains the elements of this collection minus the elements in otherSet.
 boolean existsElement(java.lang.String predicate)
          NOT SUPPORTED!
 DSet intersection(DSet otherSet)
          Create a new DSet object that is the set intersection of this DSet object and the set referenced by otherSet.
 boolean properSubsetOf(DSet otherSet)
          Determine whether this set is a proper subset of the set referenced by otherSet.
 boolean properSupersetOf(DSet otherSet)
          Determine whether this set is a proper superset of the set referenced by otherSet.
 DCollection query(java.lang.String predicate)
          NOT SUPPORTED!
 java.util.Iterator select(java.lang.String predicate)
          NOT SUPPORTED!
 java.lang.Object selectElement(java.lang.String predicate)
          NOT SUPPORTED!
 boolean subsetOf(DSet otherSet)
          Determine whether this set is a subset of the set referenced by otherSet.
 boolean supersetOf(DSet otherSet)
          Determine whether this set is a superset of the set referenced by otherSet.
 DSet union(DSet otherSet)
          Create a new DSet object that is the set union of this DSet object and the set referenced by otherSet.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

OzoneODMGDSet

public OzoneODMGDSet()

OzoneODMGDSet

public OzoneODMGDSet(java.util.Collection _collection)
Method Detail

union

public DSet union(DSet otherSet)
Create a new DSet object that is the set union of this DSet object and the set referenced by otherSet.

Specified by:
union in interface DSet
Parameters:
otherSet - The other set to be used in the union operation.
Returns:
A newly created DSet instance that contains the union of the two sets.

intersection

public DSet intersection(DSet otherSet)
Create a new DSet object that is the set intersection of this DSet object and the set referenced by otherSet.

Specified by:
intersection in interface DSet
Parameters:
otherSet - The other set to be used in the intersection operation.
Returns:
A newly created DSet instance that contains the intersection of the two sets.

difference

public DSet difference(DSet otherSet)
Create a new DSet object that contains the elements of this collection minus the elements in otherSet.

Specified by:
difference in interface DSet
Parameters:
otherSet - A set containing elements that should not be in the result set.
Returns:
A newly created DSet instance that contains the elements of this set minus those elements in otherSet.

subsetOf

public boolean subsetOf(DSet otherSet)
Determine whether this set is a subset of the set referenced by otherSet.

Specified by:
subsetOf in interface DSet
Parameters:
otherSet - Another set.
Returns:
True if this set is a subset of the set referenced by otherSet, otherwise false.

properSubsetOf

public boolean properSubsetOf(DSet otherSet)
Determine whether this set is a proper subset of the set referenced by otherSet.

Specified by:
properSubsetOf in interface DSet
Parameters:
otherSet - Another set.
Returns:
True if this set is a proper subset of the set referenced by otherSet, otherwise false.

supersetOf

public boolean supersetOf(DSet otherSet)
Determine whether this set is a superset of the set referenced by otherSet.

Specified by:
supersetOf in interface DSet
Parameters:
otherSet - Another set.
Returns:
True if this set is a superset of the set referenced by otherSet, otherwise false.

properSupersetOf

public boolean properSupersetOf(DSet otherSet)
Determine whether this set is a proper superset of the set referenced by otherSet.

Specified by:
properSupersetOf in interface DSet
Parameters:
otherSet - Another set.
Returns:
True if this set is a proper superset of the set referenced by otherSet, otherwise false.

selectElement

public java.lang.Object selectElement(java.lang.String predicate)
                               throws QueryInvalidException
NOT SUPPORTED!

Specified by:
selectElement in interface DCollection
Parameters:
predicate - An OQL boolean query predicate.
Returns:
The element that evaluates to true for the predicate. If no element evaluates to true, null is returned.
Throws:
QueryInvalidException - The query predicate is invalid.

select

public java.util.Iterator select(java.lang.String predicate)
                          throws QueryInvalidException
NOT SUPPORTED!

Specified by:
select in interface DCollection
Parameters:
predicate - An OQL boolean query predicate.
Returns:
An iterator used to iterate over the elements that evaluated true for the predicate.
Throws:
QueryInvalidException - The query predicate is invalid.

query

public DCollection query(java.lang.String predicate)
                  throws QueryInvalidException
NOT SUPPORTED!

Specified by:
query in interface DCollection
Parameters:
predicate - An OQL boolean query predicate.
Returns:
A new collection containing the elements that evaluated true for the predicate.
Throws:
QueryInvalidException - The query predicate is invalid.

existsElement

public boolean existsElement(java.lang.String predicate)
                      throws QueryInvalidException
NOT SUPPORTED!

Specified by:
existsElement in interface DCollection
Parameters:
predicate - An OQL boolean query predicate.
Returns:
True if there is an element of the collection that evaluates to true for the predicate, otherwise false.
Throws:
QueryInvalidException - The query predicate is invalid.


Copyright © 2004 The Ozone Database Project - www.ozone-db.org. All Rights Reserved.