Package org.apache.commons.configuration2.tree

# Enum NodeNameMatchers

java.lang.Object
java.lang.Enum<NodeNameMatchers>
org.apache.commons.configuration2.tree.NodeNameMatchers

All Implemented Interfaces:
  `Serializable`, `Comparable<NodeNameMatchers>`, `NodeMatcher<String>`

public enum NodeNameMatchers extends Enum<NodeNameMatchers> implements NodeMatcher<String>

An enumeration class with several pre-defined `NodeMatcher` implementations based on node names.

Filtering nodes by their name is a typical use case. Therefore, some default implementations for typical filter algorithms are already provided. They are available as constants of this class. Because the algorithms are state-less these instances can be shared and accessed concurrently.

Since:
  2.0

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `EQUALS`
  A matcher for exact node name matches.
  `EQUALS_IGNORE_CASE`
  A matcher for matches on node names which ignores case.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static NodeNameMatchers`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static NodeNameMatchers[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.apache.commons.configuration2.tree.NodeMatcher

  `matches`

- ## Enum Constant Details

  - ### EQUALS

    public static final NodeNameMatchers EQUALS
    A matcher for exact node name matches. This matcher returns true if and only if the name of the passed in node equals exactly the given criterion string.

  - ### EQUALS_IGNORE_CASE

    public static final NodeNameMatchers EQUALS_IGNORE_CASE
    A matcher for matches on node names which ignores case. For this matcher the names `node`, `NODE`, or `NodE` are all the same.

- ## Method Details

  - ### values

    public static NodeNameMatchers[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static NodeNameMatchers valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null