Class: Toybox.Lang.Boolean

Inherits:
Toybox.Lang.Object show all

Overview

Boolean objects represent a true or false value.

You can use the true or false keyword to create a Boolean.

Example:

var myBoolean = true;

Since:

API Level 1.0.0

Instance Method Summary collapse

Instance Method Details

compareTo(other as Lang.Object) as Lang.Number

Compare the numeric value of self to some other numeric value. false is

  considered numerically zero and true is considered numerically 1.

Parameters:

  • other(Lang.Object)

    The right hand side of a comparison.

Returns:

  • Lang.Number

    A negative value if self is less than other, zero if the objects are equivalent, and a positive value if self is greater than other.

Since:

API Level 5.0.0

Throws:


Generated Dec 11, 2024, 8:58:43 AM