All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.util.PriorityQueueCollection

java.lang.Object
   |
   +----com.ibm.beans.util.PriorityQueueCollection

public class PriorityQueueCollection
extends Object
implements Collection
The PriorityQueueCollection class is a Collection class that uses a priority queue.

See Also:
PriorityQueue

Constructor Index

 o PriorityQueueCollection(Comparable)
Constructs a PriorityQueueCollection instance.

Method Index

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

Constructors

 o PriorityQueueCollection
 public PriorityQueueCollection(Comparable c)
Constructs a PriorityQueueCollection instance.

Parameters:
c - The Comparable to be used in ordering the elements in this collection.

Methods

 o add
 public final synchronized void add(Object element)
Adds a specified element to this collection.

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

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

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

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

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

Parameters:
element - The element to try to find in this collection.
Returns:
true if the element is a member of this collection; false otherwise.
 o toString
 public final synchronized String toString()
Converts this collection to a String. This method is useful for debugging.

Returns:
A String representation of this collection.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index