Bool
@Serializable { simple=true }
const class Bool : Obj
Bool represents a boolean condition of true or false.
Parse a Str into a Bool
Default value is false
Return "true" or "false"
Return the logical not
Return localized strings for "true" and "false" using current locale
Bitwise "or" of this and b
Bitwise "and" of this and b
Get this Bool as a Fantom code literal - returns toStr
Return if same boolean value
Bitwise "exclusive-or" of this and b
Return 1231 for true and 1237 for false
Bool and(Bool b)
Bitwise "and" of this and b. Note this method does not short circuit like logical && operator.
const static Bool : defVal
Default value is false.
virtual Bool equals(Obj? obj)
Return if same boolean value.
static new fromStr(Str s, Bool checked)
Parse a Str into a Bool. Valid formats are "true" or "false". If invalid format and checked is false return null, otherwise throw ParseErr.
virtual Int hash()
Return 1231 for true and 1237 for false.
Bool not()
Return the logical not: if true return false; if false return true.
Bool or(Bool b)
Bitwise "or" of this and b. Note this method does not short circuit like logical || operator.
Str toCode()
Get this Bool as a Fantom code literal - returns toStr.
Str toLocale()
Return localized strings for "true" and "false" using current locale.
virtual Str toStr()
Return "true" or "false".
Bool xor(Bool b)
Bitwise "exclusive-or" of this and b.