Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EOController.Enumeration


Implements:
java.util.Enumeration
Package:
com.webobjects.eoapplication

Interface Description


EOController.Enumeration is an interface that defines an enumeration that iterates over a set of EOController objects. It adds one method to the java.util.Enumeration interface: nextController, which simply returns the next controller in the enumeration's set. The nextController method saves you from having to cast the returned object to an EOController.

Use the EOController method controllerEnumeration to get an EOController.Enumeration. You can create three types of enumerations:

SubcontrollersEnumeration
Includes all the descendants of a controller-the controller's subcontrollers, their subcontrollers, and so on down the controller hierarchy-not including the controller itself.
SupercontrollersEnumeration
Includes all the ancestors of a controller-the controller's supercontroller, its supercontroller, and so on up the controller hierarchy-not including the controller itself.
ControllerAndSubcontrollersEnumeration
Includes a controller and all its descendants.

You can further restrict the controllers included in an enumeration by specifying an interface the controllers must implement in order to be included. For more information, see the method description for controllerEnumeration in the EOController class specification.



Instance Methods



nextController

public abstract EOController nextController()

Returns the next controller in the enumeration. Use this method instead of nextElement because it saves you a cast and because it's implementation is more efficient.

See Also: controllerEnumeration (EOController)



© 2001 Apple Computer, Inc. (Last Published April 14, 2001)


Table of Contents