Class CondExprIsPrime
java.lang.Object
io.github.syst3ms.skriptparser.lang.base.ConditionalExpression
io.github.syst3ms.skriptparser.lang.properties.PropertyConditional<Number>
io.github.syst3ms.skriptparser.expressions.CondExprIsPrime
- All Implemented Interfaces:
Expression<Boolean>, SyntaxElement
Check if a given number is a prime number.
This means that for a number
n,
there does not exist a number a such that
a < n and n % a = 0, except for a = 1.- Since:
- ALPHA
-
Field Summary
Fields inherited from class PropertyConditional
CONDITIONAL_TYPE_IDENTIFIER, PROPERTY_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class PropertyConditional
check, composePatterns, getPerformer, init, setPerformer, toString, 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
-
CondExprIsPrime
public CondExprIsPrime()
-
-
Method Details
-
check
Description copied from class:PropertyConditionalTests this condition for each individual performer. Negated conditions are taken care of automatically, so one must not account for it in here.- Overrides:
checkin classPropertyConditional<Number>- Parameters:
performer- the performer- Returns:
- whether the conditions is true for this performer
-