Class CondExprIsDivisible
java.lang.Object
io.github.syst3ms.skriptparser.lang.base.ConditionalExpression
io.github.syst3ms.skriptparser.lang.properties.PropertyConditional<Number>
io.github.syst3ms.skriptparser.expressions.CondExprIsDivisible
- All Implemented Interfaces:
Expression<Boolean>, SyntaxElement
Check if a given number is divisible by another number.
Note that when the number is a decimal number,
the check will automatically fail.
- Since:
- ALPHA
-
Field Summary
Fields inherited from class PropertyConditional
CONDITIONAL_TYPE_IDENTIFIER, PROPERTY_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(TriggerContext ctx) booleaninit(Expression<?>[] expressions, int matchedPattern, ParseContext parseContext) This defaultinit()implementation automatically properly sets the performer in this condition, which can be accessed usingPropertyConditional.getPerformer().toString(TriggerContext ctx, boolean debug) Methods inherited from class PropertyConditional
check, composePatterns, getPerformer, setPerformer, toStringMethods inherited from class ConditionalExpression
getValues, isNegated, setNegatedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
acceptsChange, acceptsChange, acceptsChange, change, check, check, convertExpression, getArray, getReturnType, getSingle, getSource, isAndList, isLoopOf, isSingle, iterator, setAndList, stream
-
Constructor Details
-
CondExprIsDivisible
public CondExprIsDivisible()
-
-
Method Details
-
init
Description copied from class:PropertyConditionalThis defaultinit()implementation automatically properly sets the performer in this condition, which can be accessed usingPropertyConditional.getPerformer(). If this implementation is overridden for one reason or another, it must callPropertyConditional.setPerformer(Expression)properly.- Specified by:
initin interfaceSyntaxElement- Overrides:
initin classPropertyConditional<Number>- Parameters:
expressions- an array of expressions representing all the expressions that are being passed to this syntax element.matchedPattern- the index of the pattern that was successfully matched. It corresponds to the order of the syntaxes in registrationparseContext- an object containing additional information about the parsing of this syntax element, like regex matches and parse marks- Returns:
- whether the initialization was successful or not.
- See Also:
-
check
- Overrides:
checkin classPropertyConditional<Number>
-
toString
- Specified by:
toStringin interfaceSyntaxElement- Overrides:
toStringin classPropertyConditional<Number>- Parameters:
ctx- the eventdebug- whether to show additional information or not- Returns:
- a
Stringthat should aim to resemble what is written in the script as closely as possible
-