const class sys::Bool

sys::Obj
  sys::Bool

@Serializable { simple=true }

Source

Bool represents a boolean condition of true or false.

and

Bool and(Bool b)

Source

Bitwise "and" of this and b. Note this method does not short circuit like logical && operator.

defVal

const static Bool defVal

Source

Default value is false.

equals

virtual override Bool equals(Obj? obj)

Source

Return if same boolean value.

fromStr

static new fromStr(Str s, Bool checked := true)

Source

Parse a Str into a Bool. Valid formats are "true" or "false". If invalid format and checked is false return null, otherwise throw ParseErr.

hash

virtual override Int hash()

Source

Return 1231 for true and 1237 for false.

not

Bool not()

Source

Return the logical not: if true return false; if false return true.

or

Bool or(Bool b)

Source

Bitwise "or" of this and b. Note this method does not short circuit like logical || operator.

toCode

Str toCode()

Source

Get this Bool as a Fantom code literal - returns toStr.

toLocale

Str toLocale()

Source

Return localized strings for "true" and "false" using current locale.

toStr

virtual override Str toStr()

Source

Return "true" or "false".

xor

Bool xor(Bool b)

Source

Bitwise "exclusive-or" of this and b.