Enum Class MatchResult
- All Implemented Interfaces:
Serializable,Comparable<MatchResult>,Constable
Result of a
target selector match operation
which describes the type of match.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll parts, including optional parts of the selector matched the candidate and this result is the best.A confident match, but not an exact match.No result, the selector does not match the candidateMatches only in the weakest sense, use this result only if all else fails and nothing else matches at all -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAtLeast(MatchResult other) Get whether this match level represents a level which is the same or greater than the supplied levelbooleanGet whether this is an exact matchbooleanisMatch()Get whether this match succeededstatic MatchResultReturns the enum constant of this class with the specified name.static MatchResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No result, the selector does not match the candidate -
WEAK
Matches only in the weakest sense, use this result only if all else fails and nothing else matches at all -
MATCH
A confident match, but not an exact match. It may be that other optional parts of the selector did not match the candidate. For example this could mean that the selector matched case-insensitively. This is the best result if anEXACT_MATCHmatch is not found. -
EXACT_MATCH
All parts, including optional parts of the selector matched the candidate and this result is the best. If more than one EXACT_MATCH is returned from a query, the first one should be used.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isAtLeast
Get whether this match level represents a level which is the same or greater than the supplied level- Parameters:
other- level to compare to- Returns:
- true if greater or equal
-
isMatch
public boolean isMatch()Get whether this match succeeded -
isExactMatch
public boolean isExactMatch()Get whether this is an exact match
-