Record Class ExpressionParseCache.Failure

java.lang.Object
java.lang.Record
ch.njol.skript.lang.parser.ExpressionParseCache.Failure
Record Components:
substring - The substring that was attempted to be parsed.
effectiveFlags - The effective parse flags (runtime flags masked by the type's flag mask).
classes - The ClassInfo types the expression was expected to match.
isPlural - Whether each type accepts plural expressions.
isNullable - Whether the type is nullable (optional).
time - The time state modifier for the type.
Enclosing class:
ExpressionParseCache

public static record ExpressionParseCache.Failure(String substring, int effectiveFlags, ClassInfo<?>[] classes, boolean[] isPlural, boolean isNullable, int time) extends Record
A record representing a failed expression parse attempt. Contains all inputs that affect whether parseExpression succeeds or fails for a given substring.
  • Constructor Details

    • Failure

      public Failure(String substring, int effectiveFlags, ClassInfo<?>[] classes, boolean[] isPlural, boolean isNullable, int time)
      Creates an instance of a Failure record class.
      Parameters:
      substring - the value for the substring record component
      effectiveFlags - the value for the effectiveFlags record component
      classes - the value for the classes record component
      isPlural - the value for the isPlural record component
      isNullable - the value for the isNullable record component
      time - the value for the time record component
  • Method Details

    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • substring

      public String substring()
      Returns the value of the substring record component.
      Returns:
      the value of the substring record component
    • effectiveFlags

      public int effectiveFlags()
      Returns the value of the effectiveFlags record component.
      Returns:
      the value of the effectiveFlags record component
    • classes

      public ClassInfo<?>[] classes()
      Returns the value of the classes record component.
      Returns:
      the value of the classes record component
    • isPlural

      public boolean[] isPlural()
      Returns the value of the isPlural record component.
      Returns:
      the value of the isPlural record component
    • isNullable

      public boolean isNullable()
      Returns the value of the isNullable record component.
      Returns:
      the value of the isNullable record component
    • time

      public int time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component