org.apache.axiom.om.impl.traverse
Class OMFilterIterator

java.lang.Object
  extended by org.apache.axiom.om.impl.traverse.OMFilterIterator
All Implemented Interfaces:
Iterator
Direct Known Subclasses:
OMChildrenQNameIterator, OMChildrenWithSpecificAttributeIterator, OMQNameFilterIterator, OMQualifiedNameFilterIterator

public abstract class OMFilterIterator
extends Object
implements Iterator

Abstract iterator that returns matching nodes from another iterator.


Constructor Summary
OMFilterIterator(Iterator parent)
           
 
Method Summary
 boolean hasNext()
           
protected abstract  boolean matches(OMNode node)
          Determine whether the given node matches the filter criteria.
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMFilterIterator

public OMFilterIterator(Iterator parent)
Method Detail

matches

protected abstract boolean matches(OMNode node)
Determine whether the given node matches the filter criteria.

Parameters:
node - the node to test
Returns:
true if the node matches, i.e. if it should be returned by a call to next()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.