org.apache.axiom.om.impl.traverse

## Class OMFilterIterator

- java.lang.Object
- - org.apache.axiom.om.impl.traverse.OMFilterIterator

- All Implemented Interfaces:
    Iterator
  Direct Known Subclasses:
    OMChildrenWithSpecificAttributeIterator, OMQNameFilterIterator, OMQualifiedNameFilterIterator

      public abstract class OMFilterIterator
      extends Object
      implements Iterator

  Abstract iterator that returns matching nodes from another iterator.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OMFilterIterator(Iterator parent)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### 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 © The Apache Software Foundation. All Rights Reserved.