org.melati.poem.util
Class FilteredEnumeration<T>

Package class diagram package FilteredEnumeration
java.lang.Object
  extended by org.melati.poem.util.FilteredEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, SkipEnumeration<T>

public abstract class FilteredEnumeration<T>
extends Object
implements SkipEnumeration<T>

An Enumeration created by filtering another according to an abstract inclusion function.

Implementations must provide isIncluded(Object).


Constructor Summary
FilteredEnumeration(Enumeration<T> base)
          Constructor.
 
Method Summary
 boolean hasMoreElements()
          
protected abstract  boolean isIncluded(Object o)
           
 T nextElement()
          
 void skip()
          Skip an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredEnumeration

public FilteredEnumeration(Enumeration<T> base)
Constructor.

Parameters:
base - the Enumeration we are based upon
Method Detail

isIncluded

protected abstract boolean isIncluded(Object o)

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration<T>
See Also:
Enumeration.hasMoreElements()

nextElement

public T nextElement()

Specified by:
nextElement in interface Enumeration<T>
See Also:
Enumeration.nextElement()

skip

public void skip()
Skip an Element.

Specified by:
skip in interface SkipEnumeration<T>
See Also:
SkipEnumeration.skip()


Copyright © 2000-2010 PanEris. All Rights Reserved.