All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.util.ConditionalEnumeration

java.lang.Object
   |
   +----COM.objectspace.jgl.util.ConditionalEnumeration

public class ConditionalEnumeration
extends Object
implements Enumeration, Serializable
ConditionalEnumeration is an enumeration that traverses a subset of values.

See Also:
Enumeration, UnaryPredicate

Constructor Index

 o ConditionalEnumeration(Enumeration)
Construct myself to iterate over the same elements as enum.
 o ConditionalEnumeration(Enumeration, UnaryPredicate)
Construct myself to iterate over the elements of enum that meet the given condition.

Method Index

 o hasMoreElements()
Return true if there are more elements in my input stream that meet my condition.
 o nextElement()
Return the next element in my input stream that meets my condition.

Constructors

 o ConditionalEnumeration
 public ConditionalEnumeration(Enumeration enum)
Construct myself to iterate over the same elements as enum.

Parameters:
enum - The enumeration to traverse.
 o ConditionalEnumeration
 public ConditionalEnumeration(Enumeration enum,
                               UnaryPredicate condition)
Construct myself to iterate over the elements of enum that meet the given condition.

Parameters:
enum - The enumeration to traverse.
condition - The predicate used to determine legal enumerated values.

Methods

 o hasMoreElements
 public boolean hasMoreElements()
Return true if there are more elements in my input stream that meet my condition.

 o nextElement
 public Object nextElement() throws NoSuchElementException
Return the next element in my input stream that meets my condition.

Throws: NoSuchElementException
If there are nore more elements.

All Packages  Class Hierarchy  This Package  Previous  Next  Index