All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.Foreach
java.lang.Object
|
+----ncsa.habanero.Foreach
- public abstract class Foreach
- extends Object
This allows you to call a function on each object returned by an
Enumeration, or get the first object for which that function
returns true. You define the function in a subclass of this class.
-
Foreach(Enumeration)
- Construct this object with the Enumeration.
-
doIt(Object)
- Define this in a subclass to perform the operation you want
-
each()
- Calls doIt on each enumerated object
-
first()
- Calls doIt on each enumerated object until doIt returns true.
Foreach
public Foreach(Enumeration e)
- Construct this object with the Enumeration.
doIt
public abstract boolean doIt(Object o)
- Define this in a subclass to perform the operation you want
each
public void each()
- Calls doIt on each enumerated object
first
public Object first()
- Calls doIt on each enumerated object until doIt returns true.
Returns that object.
All Packages Class Hierarchy This Package Previous Next Index