Enum Class MatchResult

java.lang.Object
java.lang.Enum<MatchResult>
org.spongepowered.asm.mixin.injection.selectors.MatchResult
All Implemented Interfaces:
Serializable, Comparable<MatchResult>, Constable

public enum MatchResult extends Enum<MatchResult>
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 Constants
    Enum Constant
    Description
    All 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 candidate
    Matches only in the weakest sense, use this result only if all else fails and nothing else matches at all
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Get whether this match level represents a level which is the same or greater than the supplied level
    boolean
    Get whether this is an exact match
    boolean
    Get whether this match succeeded
    Returns the enum constant of this class with the specified name.
    static MatchResult[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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 Details

    • values

      public static MatchResult[] 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

      public static MatchResult valueOf(String name)
      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 name
      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