org.ozoneDB.odmg
Class OzoneODMGDBag

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byorg.ozoneDB.odmg.OzoneODMGDBag
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, DBag, DCollection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class OzoneODMGDBag
extends java.util.ArrayList
implements DBag

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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OzoneODMGDBag()
           
OzoneODMGDBag(java.util.Collection _collection)
           
 
Method Summary
 DBag difference(DBag otherBag)
          A new DBag instance is created that contains the difference of this object and the DBag instance referenced by otherBag.
 boolean existsElement(java.lang.String predicate)
          NOT SUPPORTED!
 DBag intersection(DBag otherBag)
          A new DBag instance is created that contains the intersection of this object and the DBag referenced by otherBag.
 int occurrences(java.lang.Object obj)
          This method returns the number of occurrences of the object obj in the DBag collection.
 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!
 DBag union(DBag otherBag)
          A new DBag instance is created that is the union of this object and otherBag.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, 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.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

OzoneODMGDBag

public OzoneODMGDBag()

OzoneODMGDBag

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

union

public DBag union(DBag otherBag)
A new DBag instance is created that is the union of this object and otherBag. This method is similar to the addAll method in Collection, except that this method creates a new collection and addAll modifies the object to contain the result.

Specified by:
union in interface DBag
Parameters:
otherBag - The other bag to use in the union operation.
Returns:
A DBag instance that contains the union of this object and otherBag.

intersection

public DBag intersection(DBag otherBag)
A new DBag instance is created that contains the intersection of this object and the DBag referenced by otherBag. This method is similar to the retainAll method in Collection, except that this method creates a new collection and retainAll modifies the object to contain the result.

Specified by:
intersection in interface DBag
Parameters:
otherBag - The other bag to use in creating the intersection.
Returns:
A DBag instance that contains the intersection of this object and otherBag.

difference

public DBag difference(DBag otherBag)
A new DBag instance is created that contains the difference of this object and the DBag instance referenced by otherBag. This method is similar to the removeAll method in Collection, except that this method creates a new collection and removeAll modifies the object to contain the result.

Specified by:
difference in interface DBag
Parameters:
otherBag - The other bag to use in creating the difference.
Returns:
A DBag instance that contains the elements of this object minus the elements in otherBag.

occurrences

public int occurrences(java.lang.Object obj)
This method returns the number of occurrences of the object obj in the DBag collection.

Specified by:
occurrences in interface DBag
Parameters:
obj - The value that may have elements in the collection.
Returns:
The number of occurrences of obj in this collection.

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.