Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/Boolean

Boolean

scala.Boolean
See theBoolean companion object
final abstractclassBoolean() extendsAnyVal

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.

Attributes

Companion
object
Source
Boolean.scala
Graph
Supertypes
classAnyVal
traitMatchable
classAny

Members list

Value members

Abstract methods

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.

Attributes

Source
Boolean.scala

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.

Attributes

Note

This method evaluates botha andb, even if the result is already determined after evaluatinga.

Source
Boolean.scala

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.

Attributes

Note

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.

Source
Boolean.scala

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.

Attributes

Source
Boolean.scala

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.

Attributes

Source
Boolean.scala

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.

Attributes

Returns

the negated expression

Source
Boolean.scala

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.

Attributes

Note

This method evaluates botha andb, even if the result is already determined after evaluatinga.

Source
Boolean.scala

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.

Attributes

Note

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.

Source
Boolean.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp