org.apache.commons.configuration2.tree

## Interface NodeMatcher<C>

- Type Parameters:
    `C` - the type of the criterion evaluated by this matcher
  All Known Implementing Classes:
    NodeNameMatchers

      public interface NodeMatcher<C>

  An interface for matching nodes based on specific criteria.

  This interface is used by `NodeHandler` to support advanced filtering on the child nodes of a given parent node. This is useful for instance for special `ExpressionEngine` implementations which do no direct or strict matches based on node names. An example could be an expression engine that treats the passed in node keys in a case-insensitive manner. Such an engine would use a special case-insensitive matcher when resolving configuration keys.

  The idea behind this interface is that a matcher has to match a property of a node against a given criterion. This criterion is passed to the matching function so that matchers can be implemented in a state-less fashion and shared between multiple components.

  Since:
    2.0
  Version:
    $Id: NodeMatcher.java 1636050 2014-11-01 20:59:08Z oheger $

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> boolean` | `matches(T node, NodeHandler<T> handler, C criterion)` Tests whether the passed in node matches the given criterion.

- - ### Method Detail

    - #### matches

          <T> boolean matches(T node,
                              NodeHandler<T> handler,
                              C criterion)

      Tests whether the passed in node matches the given criterion.
      Type Parameters:
        `T` - the type of the node
      Parameters:
        `node` - the node to be tested
        `handler` - the corresponding `NodeHandler`
        `criterion` - the criterion to match against
      Returns:
        true if this node matches the criterion, false otherwise

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.