org.apache.ojb.odmg.collections
Class DBagImpl
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
org.apache.ojb.odmg.collections.DListImpl
org.apache.ojb.odmg.collections.DBagImpl
- All Implemented Interfaces:
- Serializable, Iterable, Collection, List, ManageableCollection, PersistenceBrokerAware, DArray, DBag, DCollection, DList
public class DBagImpl
- extends DListImpl
- implements DBag
The DBag implementation class.
- See Also:
- Serialized Form
|
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(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 org.apache.ojb.odmg.collections.DListImpl |
add, afterDelete, afterInsert, afterLookup, afterStore, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, checkForOpenTransaction, concat, existsElement, get, getElements, getId, getLog, getPBKey, getTransaction, hashCode, iterator, listIterator, listIterator, ojbAdd, ojbAddAll, ojbIterator, query, remove, resize, select, selectElement, setElements, setId, setPBKey, size, toString |
| 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, indexOf, isEmpty, lastIndexOf, remove, removeAll, retainAll, set, subList, toArray, toArray |
DBagImpl
public DBagImpl()
DBagImpl
public DBagImpl(PBKey key)
- DBagImpl constructor comment.
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(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.
Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.