Class CondExprIsPrime

All Implemented Interfaces:
Expression<Boolean>, SyntaxElement

public class CondExprIsPrime extends PropertyConditional<Number>
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
  • Constructor Details

    • CondExprIsPrime

      public CondExprIsPrime()
  • Method Details

    • check

      public boolean check(Number performer)
      Description copied from class: PropertyConditional
      Tests this condition for each individual performer. Negated conditions are taken care of automatically, so one must not account for it in here.
      Overrides:
      check in class PropertyConditional<Number>
      Parameters:
      performer - the performer
      Returns:
      whether the conditions is true for this performer