Class EnumWrapper
public class EnumWrapper implements Enumeration
{
// Constructors
public EnumWrapper(Object o);
// Methods
public boolean hasMoreElements();
public Object nextElement();
}
This class is a simple implementation of the Enumeration interface. The EnumWrapper object generates a list of objects and accesses them through calls to the nextElement method.
public EnumWrapper(Object o);
Constructs an EnumWrapper from the specified base object.
Parameter | Description |
o
| The object to create the EnumWrapper object from.
|
public boolean hasMoreElements();
Determines if there are elements remaining in the Enumeration.
Return Value:
Returns true if the EnumWrapper contains more elements; otherwise, returns false.
public Object nextElement();
Retrieves the next object in the enumeration.
Return Value:
Returns the next object in the enumeration.