new OBoolean(value)
Creates an instance of OBoolean
based on the value passed as a parameter.
In general this constructor shouldn't be used. It's much better to use the static factory
.
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | The initial value for this boolean. |
Members
-
<static, constant, non-null> FALSE :olympe.df.OBoolean
-
The
OBoolean
object corresponding to the primitive valuefalse
.Type:
-
<static, constant, non-null> TRUE :olympe.df.OBoolean
-
The
OBoolean
object corresponding to the primitive valuetrue
.Type:
Methods
-
<static> fromJSON(json)
-
Deserializes an
OBoolean
from a JSON object or string.Parameters:
Name Type Description json
string | Object Returns:
- Type
- olympe.df.OBoolean
-
and(otherBool)
-
Returns the result of applying the logical AND operator to the specified boolean operands. It returns true if both boolean are true, false otherwise.
Parameters:
Name Type Description otherBool
olympe.df.POBoolean | boolean Returns:
- Type
- olympe.df.POBoolean
-
andNot(otherBool)
-
Returns the result of applying the logical NAND operator to the specified boolean operands.
Parameters:
Name Type Description otherBool
olympe.df.POBoolean | boolean The
OBoolean
to compare this to.Returns:
True if this 'OBoolean` is true and otherBool is false.
- Type
- olympe.df.POBoolean
-
equals( [otherBool])
-
Checks for equality between two booleans.
Parameters:
Name Type Argument Description otherBool
olympe.df.OBoolean | boolean <optional>
Returns:
true if both Booleans are equal.
- Type
- boolean
-
getBoolean()
-
Don't needed anymore as this OBoolean is a Boolean
- Deprecated:
-
- Use
valueOf
method if you need primitive boolean
- Use
Returns:
This OBoolean as Boolean
- Type
- boolean
-
getONum()
-
Converts this
OBoolean
into aONumber
.Returns:
A
ONumber
set to '0' (false) or '1' (true)- Type
- olympe.df.PONumber
-
getOString()
-
Creates an
OString
representation of thisOBoolean
.- Deprecated:
-
- Use
toOstring
instead.
- Use
Returns:
The
OString
representation- Type
- olympe.df.POString
-
not()
-
Returns the result of applying the logical NOT operator on this
OBoolean
.Returns:
True is this
OBoolean
was false, true otherwise.- Type
- olympe.df.POBoolean
-
oEquals( [otherBool])
-
Checks for equality between two booleans.
Parameters:
Name Type Argument Description otherBool
olympe.df.POBoolean | boolean <optional>
Returns:
- Type
- olympe.df.POBoolean
-
or(otherBool)
-
Returns the result of applying the logical OR operator to the specified boolean operands. True if any, or both, of the
OBooleans
is true, false otherwise.Parameters:
Name Type Description otherBool
olympe.df.POBoolean | boolean Returns:
- Type
- olympe.df.POBoolean
-
toJSON()
-
Converts this
OBoolean
into a JSON string.Returns:
- Type
- string
-
toOString()
-
Creates an
OString
representation of thisOBoolean
.Returns:
The
OString
representation- Type
- olympe.df.POString
-
toString()
-
Creates a string representation of this 'OBoolean'.
Returns:
'true' or 'false'
- Type
- string
-
valueOf()
-
Converts this
OBoolean
into a primitive typeboolean
.Returns:
- Type
- boolean
-
xor(otherBool)
-
Returns the result of applying the logical XOR (exclusive or) operator to the specified boolean operands. True if one -- and only one -- of the
OBooleans
is true, false otherwise.Parameters:
Name Type Description otherBool
olympe.df.POBoolean | boolean Returns:
- Type
- olympe.df.POBoolean