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.
-
add(Object)
- Adds a specified element to the collection.
-
contains(Object)
- Determines if an element is a member of the collection.
-
elements()
- Gets an enumeration of the elements in the collection.
-
isEmpty()
- Checks to see if the collection is empty.
-
remove(Object)
- Removes a specified element from the collection.
-
size()
- Gets the number of elements in the collection.
add
public abstract void add(Object element)
- Adds a specified element to the collection.
- Parameters:
- element - The element to be added.
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.
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.
size
public abstract int size()
- Gets the number of elements in the collection.
- Returns:
- The number of elements in the collection.
isEmpty
public abstract boolean isEmpty()
- Checks to see if the collection is empty.
- Returns:
-
true
if the collection is empty;
false
otherwise.
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