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

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

public abstract class OMFilterIterator
extends java.lang.Object
implements java.util.Iterator

Abstract iterator that returns matching nodes from another iterator.


Constructor Summary
OMFilterIterator(java.util.Iterator parent)
           
 
Method Summary
 boolean hasNext()
           
protected abstract  boolean matches(OMNode node)
          Determine whether the given node matches the filter criteria.
 java.lang.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(java.util.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 java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


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