Boolean

scala.Boolean
See theBoolean companion object
final abstract class Boolean() extends AnyVal

Boolean (equivalent to Java's boolean primitive type) is a subtype of scala.AnyVal. Instances of Boolean are not represented by an object in the underlying runtime system.

There is an implicit conversion from scala.Boolean => scala.runtime.RichBoolean which provides useful non-primitive operations.

Attributes

Companion
object
Source
Boolean.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Abstract methods

def !=(x: Boolean): Boolean

Compares two Boolean expressions and returns true if they evaluate to a different value.

Compares two Boolean expressions and returns true if they evaluate to a different value.

a != b returns true if and only if - a is true and b is false or - a is false and b is true.

Attributes

Source
Boolean.scala
def &(x: Boolean): Boolean

Compares two Boolean expressions and returns true if both of them evaluate to true.

Compares two Boolean expressions and returns true if both of them evaluate to true.

a & b returns true if and only if - a and b are true.

Attributes

Note

This method evaluates both a and b, even if the result is already determined after evaluating a.

Source
Boolean.scala
def &&(x: Boolean): Boolean

Compares two Boolean expressions and returns true if both of them evaluate to true.

Compares two Boolean expressions and returns true if both of them evaluate to true.

a && b returns true if and only if - a and b are true.

Attributes

Note

This method uses 'short-circuit' evaluation and behaves as if it was declared as def &&(x: => Boolean): Boolean. If a evaluates to false, false is returned without evaluating b.

Source
Boolean.scala
def ==(x: Boolean): Boolean

Compares two Boolean expressions and returns true if they evaluate to the same value.

Compares two Boolean expressions and returns true if they evaluate to the same value.

a == b returns true if and only if - a and b are true or - a and b are false.

Attributes

Source
Boolean.scala
def ^(x: Boolean): Boolean

Compares two Boolean expressions and returns true if they evaluate to a different value.

Compares two Boolean expressions and returns true if they evaluate to a different value.

a ^ b returns true if and only if - a is true and b is false or - a is false and b is true.

Attributes

Source
Boolean.scala

Negates a Boolean expression.

Negates a Boolean expression.

- !a results in false if and only if a evaluates to true and - !a results in true if and only if a evaluates to false.

Attributes

Returns

the negated expression

Source
Boolean.scala
def |(x: Boolean): Boolean

Compares two Boolean expressions and returns true if one or both of them evaluate to true.

Compares two Boolean expressions and returns true if one or both of them evaluate to true.

a | b returns true if and only if - a is true or - b is true or - a and b are true.

Attributes

Note

This method evaluates both a and b, even if the result is already determined after evaluating a.

Source
Boolean.scala
def ||(x: Boolean): Boolean

Compares two Boolean expressions and returns true if one or both of them evaluate to true.

Compares two Boolean expressions and returns true if one or both of them evaluate to true.

a || b returns true if and only if - a is true or - b is true or - a and b are true.

Attributes

Note

This method uses 'short-circuit' evaluation and behaves as if it was declared as def ||(x: => Boolean): Boolean. If a evaluates to true, true is returned without evaluating b.

Source
Boolean.scala