java.lang.Object
coneforest.psylla.core.PsyBoolean
- All Implemented Interfaces:
PsyAtomic
,PsyLogical<PsyBoolean>
,PsyObject
,PsyScalar<PsyBoolean>
@Type("boolean")
public final class PsyBoolean
extends Object
implements PsyAtomic, PsyScalar<PsyBoolean>, PsyLogical<PsyBoolean>
The representation of
boolean
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyBoolean
Aboolean
constant, representing false.static final PsyBoolean
Aboolean
constant, representing true.Fields inherited from interface coneforest.psylla.core.PsyLogical
PSY_AND, PSY_NOT, PSY_OR, PSY_XOR
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns a boolean value of this object.boolean
int
hashCode()
static PsyBoolean
of
(boolean bool) Returns aboolean
representing the given boolean value.psyAnd
(PsyBoolean oBoolean) Returns a result of boolean conjunction of this object and given object.psyCmp
(PsyBoolean oBoolean) Compares this object against given object and returns aninteger
indicating the result of the comparison.Returns a result of equality test of this object and given object.psyGe
(PsyBoolean oBoolean) Returns aboolean
object representing the result of “greater or equal” comparison of this object and a given object.psyGt
(PsyBoolean oBoolean) Returns aboolean
object representing the result of “greater” comparison of this object and a given object.psyLe
(PsyBoolean oBoolean) Returns aboolean
object representing the result of “less or equal” comparison of this object and a given object.psyLt
(PsyBoolean oBoolean) Returns aboolean
object representing the result of “less” comparison of this object and a given object.psyNot()
Returns a result of boolean negation of this object.psyOr
(PsyBoolean oBoolean) Returns a result of boolean disjunction of this object and given object.psyXor
(PsyBoolean oBoolean) Returns a result of boolean exclusive disjunction of this object and given object.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
Field Details
-
FALSE
Aboolean
constant, representing false. -
TRUE
Aboolean
constant, representing true.
-
-
Method Details
-
booleanValue
public boolean booleanValue()Returns a boolean value of this object.- Returns:
- a boolean value of this object.
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- a string
false
ortrue
depending on this object value.
-
psyNot
Returns a result of boolean negation of this object.- Specified by:
psyNot
in interfacePsyLogical<PsyBoolean>
- Returns:
- a result.
-
psyOr
Returns a result of boolean disjunction of this object and given object.- Specified by:
psyOr
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a result.
-
psyAnd
Returns a result of boolean conjunction of this object and given object.- Specified by:
psyAnd
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a result.
-
psyXor
Returns a result of boolean exclusive disjunction of this object and given object.- Specified by:
psyXor
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a result.
-
psyEq
Returns a result of equality test of this object and given object. -
psyCmp
Description copied from interface:PsyScalar
Compares this object against given object and returns aninteger
indicating the result of the comparison. Returns negative value if this object is less than given one, zero if this object is equal to given one, and positive value if this object is greater than given one.- Specified by:
psyCmp
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- an object with which this object is compared.- Returns:
- a result of the comparison.
-
psyLt
Description copied from interface:PsyScalar
Returns aboolean
object representing the result of “less” comparison of this object and a given object.- Specified by:
psyLt
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- an object with which this object is compared.- Returns:
- a
boolean
value indicating if this object is less than given object.
-
psyLe
Description copied from interface:PsyScalar
Returns aboolean
object representing the result of “less or equal” comparison of this object and a given object.- Specified by:
psyLe
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- an object with which this object is compared.- Returns:
- a
boolean
value indicating if this object is less than or equal to given object.
-
psyGt
Description copied from interface:PsyScalar
Returns aboolean
object representing the result of “greater” comparison of this object and a given object.- Specified by:
psyGt
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- an object with which this object is compared.- Returns:
- a
boolean
result of comparison.
-
psyGe
Description copied from interface:PsyScalar
Returns aboolean
object representing the result of “greater or equal” comparison of this object and a given object.- Specified by:
psyGe
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- an object with which this object is compared.- Returns:
- a
boolean
result of comparison.
-
hashCode
public int hashCode() -
equals
-
of
Returns aboolean
representing the given boolean value.- Parameters:
bool
- a given value.- Returns:
- a
boolean
object.
-