Boolean (equivalent to Java'sboolean primitive type) is a subtype ofscala.AnyVal. Instances ofBoolean are not represented by an object in the underlying runtime system.
There is an implicit conversion fromscala.Boolean =>scala.runtime.RichBoolean which provides useful non-primitive operations.
Compares two Boolean expressions and returnstrue if they evaluate to a different value.
Compares two Boolean expressions and returnstrue if they evaluate to a different value.
a != b returnstrue if and only if -a istrue andb isfalse or -a isfalse andb istrue.
Compares two Boolean expressions and returnstrue if both of them evaluate to true.
Compares two Boolean expressions and returnstrue if both of them evaluate to true.
a & b returnstrue if and only if -a andb aretrue.
This method evaluates botha andb, even if the result is already determined after evaluatinga.
Compares two Boolean expressions and returnstrue if both of them evaluate to true.
Compares two Boolean expressions and returnstrue if both of them evaluate to true.
a && b returnstrue if and only if -a andb aretrue.
This method uses 'short-circuit' evaluation and behaves as if it was declared asdef &&(x: => Boolean): Boolean. Ifa evaluates tofalse,false is returned without evaluatingb.
Compares two Boolean expressions and returnstrue if they evaluate to the same value.
Compares two Boolean expressions and returnstrue if they evaluate to the same value.
a == b returnstrue if and only if -a andb aretrue or -a andb arefalse.
Compares two Boolean expressions and returnstrue if they evaluate to a different value.
Compares two Boolean expressions and returnstrue if they evaluate to a different value.
a^ b returnstrue if and only if -a istrue andb isfalse or -a isfalse andb istrue.
Negates a Boolean expression.
Negates a Boolean expression.
-!a results infalse if and only ifa evaluates totrue and -!a results intrue if and only ifa evaluates tofalse.
the negated expression
Compares two Boolean expressions and returnstrue if one or both of them evaluate to true.
Compares two Boolean expressions and returnstrue if one or both of them evaluate to true.
a | b returnstrue if and only if -a istrue or -b istrue or -a andb aretrue.
This method evaluates botha andb, even if the result is already determined after evaluatinga.
Compares two Boolean expressions and returnstrue if one or both of them evaluate to true.
Compares two Boolean expressions and returnstrue if one or both of them evaluate to true.
a || b returnstrue if and only if -a istrue or -b istrue or -a andb aretrue.
This method uses 'short-circuit' evaluation and behaves as if it was declared asdef ||(x: => Boolean): Boolean. Ifa evaluates totrue,true is returned without evaluatingb.