ojb.server.collections
Class DBagImpl

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--ojb.server.collections.DListImpl
                    |
                    +--ojb.server.collections.DBagImpl
All Implemented Interfaces:
java.util.Collection, DArray, DBag, DCollection, DList, java.util.List, ManageableCollection

public class DBagImpl
extends DListImpl
implements DBag

Insert the type's description here. Creation date: (25.02.2001 12:53:12)


Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DBagImpl()
          DBagImpl constructor comment.
DBagImpl(int theId, int theSize)
          DBagImpl constructor comment.
 
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.
 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.
 DBag union(DBag otherBag)
          A new DBag instance is created that is the union of this object and otherBag.
 
Methods inherited from class ojb.server.collections.DListImpl
add, concat, existsElement, get, getElements, getId, iterator, listIterator, listIterator, ojbAdd, ojbAddAll, ojbIterator, query, resize, select, selectElement, size
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.odmg.DCollection
existsElement, query, select, selectElement
 
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
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Constructor Detail

DBagImpl

public DBagImpl()
DBagImpl constructor comment.

DBagImpl

public DBagImpl(int theId,
                int theSize)
DBagImpl constructor comment.
Parameters:
theId - int
theSize - int
Method Detail

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.

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.

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.

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.


Authors: Thomas Mahler, David Dixon-Peugh. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.1.120, 2001-05-12