Package org.spongepowered.asm.mixin.injection.selectors

## Enum MatchResult

- java.lang.Object
- - java.lang.Enum<MatchResult>
  - - org.spongepowered.asm.mixin.injection.selectors.MatchResult

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Comparable<MatchResult>`

      public enum MatchResult
      extends java.lang.Enum<MatchResult>

  Result of a `target selector` match operation which describes the type of match.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `EXACT_MATCH` | All parts, including optional parts of the selector matched the candidate and this result is the best.
    `MATCH` | A confident match, but not an exact match.
    `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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isAtLeast​(MatchResult other)` | Get whether this match level represents a level which is the same or greater than the supplied level
    `boolean` | `isExactMatch()` | Get whether this is an exact match
    `boolean` | `isMatch()` | Get whether this match succeeded
    `static MatchResult` | `valueOf​(java.lang.String name)` | Returns the enum constant of this type with the specified name.
    `static MatchResult[]` | `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`

- - ### Enum Constant Detail

    - #### NONE

          public static final MatchResult NONE

      No result, the selector does not match the candidate

    - #### WEAK

          public static final MatchResult WEAK

      Matches only in the weakest sense, use this result only if all else fails and nothing else matches at all

    - #### MATCH

          public static final MatchResult 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 an `EXACT_MATCH` match is not found.

    - #### EXACT_MATCH

          public static final MatchResult 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 Detail

    - #### values

          public static MatchResult[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MatchResult c : MatchResult.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static MatchResult valueOf​(java.lang.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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### isAtLeast

          public boolean isAtLeast​(MatchResult other)

      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