Enum NodeNameMatchers
- All Implemented Interfaces:
Serializable
,Comparable<NodeNameMatchers>
,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 ConstantDescriptionA matcher for exact node name matches.A matcher for matches on node names which ignores case. -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeNameMatchers
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 interface org.apache.commons.configuration2.tree.NodeMatcher
matches
-
Enum Constant Details
-
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
A matcher for matches on node names which ignores case. For this matcher the namesnode
,NODE
, orNodE
are all the same.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-