public interface DBag extends DCollection
Collection
interface are supported by an ODMG implementation of DBag
,
the exception UnsupportedOperationException
is not thrown when a
call is made to any of the Collection
methods.Modifier and Type | Method and Description |
---|---|
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 . |
existsElement, query, select, selectElement
DBag union(DBag otherBag)
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.otherBag
- The other bag to use in the union operation.DBag
instance that contains the union of this object
and otherBag
.DBag intersection(DBag otherBag)
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.otherBag
- The other bag to use in creating the intersection.DBag
instance that contains the intersection of this
object and otherBag
.DBag difference(DBag otherBag)
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.otherBag
- The other bag to use in creating the difference.DBag
instance that contains the elements of this object
minus the elements in otherBag
.int occurrences(java.lang.Object obj)
obj
in the DBag
collection.obj
- The value that may have elements in the collection.obj
in this collection.(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30