Boolean

A truth value, either true or false.

Use && and || for short-circuit evaluation. The and, or and xor functions evaluate both operands before combining their values. Ordering places false before true.

Functions

Link copied to clipboard
infix external fun and(other: Boolean): Boolean

Returns true when this value and other are both true.

Link copied to clipboard
open operator external override fun compareTo(other: Boolean): Int

Compares this value with other, placing false before true.

Link copied to clipboard
operator external fun not(): Boolean

Returns the logical negation of this value.

Link copied to clipboard
infix external fun or(other: Boolean): Boolean

Returns true when at least one of this value and other is true.

Link copied to clipboard
operator fun Boolean.rangeTo(other: Boolean): ClosedRange<Boolean>

Creates a Boolean range from this value up to other, inclusive.

Link copied to clipboard

Creates a Boolean range from this value up to other, exclusive.

Link copied to clipboard
infix external fun xor(other: Boolean): Boolean

Returns true when exactly one of this value and other is true.