Package ch.njol.skript.lang.parser
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClassInfo<?>[]classes()Returns the value of theclassesrecord component.intReturns the value of theeffectiveFlagsrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanReturns the value of theisNullablerecord component.boolean[]isPlural()Returns the value of theisPluralrecord component.Returns the value of thesubstringrecord component.inttime()Returns the value of thetimerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Failure
public Failure(String substring, int effectiveFlags, ClassInfo<?>[] classes, boolean[] isPlural, boolean isNullable, int time) Creates an instance of aFailurerecord class.- Parameters:
substring- the value for thesubstringrecord componenteffectiveFlags- the value for theeffectiveFlagsrecord componentclasses- the value for theclassesrecord componentisPlural- the value for theisPluralrecord componentisNullable- the value for theisNullablerecord componenttime- the value for thetimerecord component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
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. -
substring
Returns the value of thesubstringrecord component.- Returns:
- the value of the
substringrecord component
-
effectiveFlags
public int effectiveFlags()Returns the value of theeffectiveFlagsrecord component.- Returns:
- the value of the
effectiveFlagsrecord component
-
classes
Returns the value of theclassesrecord component.- Returns:
- the value of the
classesrecord component
-
isPlural
public boolean[] isPlural()Returns the value of theisPluralrecord component.- Returns:
- the value of the
isPluralrecord component
-
isNullable
public boolean isNullable()Returns the value of theisNullablerecord component.- Returns:
- the value of the
isNullablerecord component
-
time
public int time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-