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
ora
is false
and b
is true
.
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
.
This method evaluates both a
and b
, even if the result is already determined after evaluating a
.
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
.
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
.
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
ora
and b
are false
.
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
ora
is false
and b
is true
.
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
.
the negated expression
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
orb
is true
ora
and b
are true
.
This method evaluates both a
and b
, even if the result is already determined after evaluating a
.
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
orb
is true
ora
and b
are true
.
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
.
Returns true if this
is less than that
Returns true if this
is less than that
Returns true if this
is less than or equal to that
.
Returns true if this
is less than or equal to that
.
Returns true if this
is greater than that
.
Returns true if this
is greater than that
.
Returns true if this
is greater than or equal to that
.
Returns true if this
is greater than or equal to that
.
Result of comparing this
with operand that
.
Result of comparing this
with operand that
.
Implement this method to determine how instances of A will be sorted.
Returns x
where:
x < 0
when this < that
x == 0
when this == that
x > 0
when this > that
Result of comparing this
with operand that
.
Result of comparing this
with operand that
.
Returns the runtime class representation of the object.
The equality method for reference types.
The equality method for reference types. Default implementation delegates to eq
.
See also equals
in scala.Any.
true
if the receiver object is equivalent to the argument; false
otherwise.
(boolean: java.lang.Boolean).equals(arg0)
The hashCode method for reference types.
The hashCode method for reference types. See hashCode in scala.Any.
the hash code value for this object.
(boolean: java.lang.Boolean).hashCode()
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
(boolean: java.lang.Boolean).toString()
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
a string representation of the object.
(boolean: RichBoolean).toString()
Boolean
(equivalent to Java'sboolean
primitive type) is a subtype of scala.AnyVal. Instances ofBoolean
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.