org.openide.util.enum
Class AlterEnumeration
java.lang.Object
|
+--org.openide.util.enum.AlterEnumeration
- All Implemented Interfaces:
- Enumeration
- public abstract class AlterEnumeration
- extends Object
- implements Enumeration
Abstract class that takes an enumeration and alter their elements
to new objects.
To get this class fully work one must override alter
method.
Objects in the input and resulting enumeration must not be null
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlterEnumeration
public AlterEnumeration(Enumeration en)
- Parameters:
en
- enumeration to filter
alter
protected abstract Object alter(Object o)
- Alters objects. Overwrite this to alter the object in the
enumeration by another.
- Parameters:
o
- the object to decide on- Returns:
- new object to be placed into the output enumeration
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface Enumeration
- Returns:
- true if there is more elements in the enumeration
nextElement
public Object nextElement()
- Specified by:
nextElement
in interface Enumeration
- Returns:
- next object in the enumeration
- Throws:
NoSuchElementException
- can be thrown if there is no next object
in the enumeration
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.