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
OBooleanobject corresponding to the primitive valuefalse.Type:
-
<static, constant, non-null> TRUE :olympe.df.OBoolean
-
The
OBooleanobject corresponding to the primitive valuetrue.Type:
Methods
-
<static> fromJSON(json)
-
Deserializes an
OBooleanfrom a JSON object or string.Parameters:
Name Type Description jsonstring | 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 otherBoololympe.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 otherBoololympe.df.POBoolean | boolean The
OBooleanto 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 otherBoololympe.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
valueOfmethod if you need primitive boolean
- Use
Returns:
This OBoolean as Boolean
- Type
- boolean
-
getONum()
-
Converts this
OBooleaninto aONumber.Returns:
A
ONumberset to '0' (false) or '1' (true)- Type
- olympe.df.PONumber
-
getOString()
-
Creates an
OStringrepresentation of thisOBoolean.- Deprecated:
-
- Use
toOstringinstead.
- Use
Returns:
The
OStringrepresentation- Type
- olympe.df.POString
-
not()
-
Returns the result of applying the logical NOT operator on this
OBoolean.Returns:
True is this
OBooleanwas false, true otherwise.- Type
- olympe.df.POBoolean
-
oEquals( [otherBool])
-
Checks for equality between two booleans.
Parameters:
Name Type Argument Description otherBoololympe.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
OBooleansis true, false otherwise.Parameters:
Name Type Description otherBoololympe.df.POBoolean | boolean Returns:
- Type
- olympe.df.POBoolean
-
toJSON()
-
Converts this
OBooleaninto a JSON string.Returns:
- Type
- string
-
toOString()
-
Creates an
OStringrepresentation of thisOBoolean.Returns:
The
OStringrepresentation- Type
- olympe.df.POString
-
toString()
-
Creates a string representation of this 'OBoolean'.
Returns:
'true' or 'false'
- Type
- string
-
valueOf()
-
Converts this
OBooleaninto 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
OBooleansis true, false otherwise.Parameters:
Name Type Description otherBoololympe.df.POBoolean | boolean Returns:
- Type
- olympe.df.POBoolean
Olympe SDK