All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.ibm.beans.util.Collection

public interface interface Collection
extends Serializable
Collections can be used to generically indicate a storage mechanism. This allows a class to separate the logic of what needs to be done from the storage mechanism used to hold the data. Therefore, a class could perform the same logic on the data, independent of whether the data is kept in a Vector or a Hashtable or a PriorityQueue or some other collection.


Method Index

 o add(Object)
Adds a specified element to the collection.
 o contains(Object)
Determines if an element is a member of the collection.
 o elements()
Gets an enumeration of the elements in the collection.
 o isEmpty()
Checks to see if the collection is empty.
 o remove(Object)
Removes a specified element from the collection.
 o size()
Gets the number of elements in the collection.

Methods

 o add
 public abstract void add(Object element)
Adds a specified element to the collection.

Parameters:
element - The element to be added.
 o remove
 public abstract boolean remove(Object element)
Removes a specified element from the collection.

Parameters:
element - The element to be removed.
Returns:
true if the argument was a component of the collection; false otherwise.
 o elements
 public abstract Enumeration elements()
Gets an enumeration of the elements in the collection. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Returns:
An enumeration of the components of the collection.
 o size
 public abstract int size()
Gets the number of elements in the collection.

Returns:
The number of elements in the collection.
 o isEmpty
 public abstract boolean isEmpty()
Checks to see if the collection is empty.

Returns:
true if the collection is empty; false otherwise.
 o contains
 public abstract boolean contains(Object element)
Determines if an element is a member of the collection.

Parameters:
element - The element to try to find in the collection.
Returns:
true if the element is a member of the collection; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index