net.sourceforge.jane.util
Class ExtendedEnumeration

java.lang.Object
  |
  +--net.sourceforge.jane.util.ExtendedEnumeration
All Implemented Interfaces:
java.util.Enumeration
Direct Known Subclasses:
ChildNodeEnumeration, NodeEnumeration

public abstract class ExtendedEnumeration
extends java.lang.Object
implements java.util.Enumeration

An extended enumeration base class with predicate and reset support.


Field Summary
protected  org.apache.commons.collections.Predicate predicate
           
 
Constructor Summary
ExtendedEnumeration()
          Create a new ExtendedEnumeration.
ExtendedEnumeration(org.apache.commons.collections.Predicate aPredicate)
          Create a new ExtendedEnumeration.
 
Method Summary
protected abstract  boolean doCheckSize()
          Returns true if there are not more elements in the current series.
protected  boolean doEvaluate()
          Evaluate the current element.
protected abstract  void doNext()
          Go to the next element.
protected abstract  java.lang.Object getCurrent()
          Returns the current element.
 boolean hasMoreElements()
          Returns true if there are more elements.
 java.lang.Object nextElement()
          Returns the next element.
abstract  void reset()
          Reset this enumeration to the beginning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

predicate

protected org.apache.commons.collections.Predicate predicate
Constructor Detail

ExtendedEnumeration

public ExtendedEnumeration()
Create a new ExtendedEnumeration.

ExtendedEnumeration

public ExtendedEnumeration(org.apache.commons.collections.Predicate aPredicate)
Create a new ExtendedEnumeration.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Returns true if there are more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Returns the next element.
Specified by:
nextElement in interface java.util.Enumeration

reset

public abstract void reset()
Reset this enumeration to the beginning.

doCheckSize

protected abstract boolean doCheckSize()
Returns true if there are not more elements in the current series.

getCurrent

protected abstract java.lang.Object getCurrent()
Returns the current element.

doNext

protected abstract void doNext()
Go to the next element.

doEvaluate

protected boolean doEvaluate()
Evaluate the current element.


Copyright © 2002-2002 SourceForge. All Rights Reserved.