java.lang.Object
coneforest.psylla.core.PsyBoolean
- All Implemented Interfaces:
PsyLogical<PsyBoolean>
,PsyObject
,PsyScalar<PsyBoolean>
,PsyValue
,Comparable<PsyBoolean>
@Type("boolean")
public final class PsyBoolean
extends Object
implements PsyLogical<PsyBoolean>, PsyScalar<PsyBoolean>, PsyValue
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_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns a boolean value of this object.int
compareTo
(PsyBoolean oBoolean) Compares thisscalar
with the specifiedscalar
for order.boolean
int
hashCode()
static PsyBoolean
of
(boolean bool) Returns aboolean
representing the given boolean value.psyAnd
(PsyBoolean oBoolean) Returns aboolean
result of boolean conjunction of this object and given object.psyNot()
Returns aboolean
result of boolean negation of this object.psyOr
(PsyBoolean oBoolean) Returns aboolean
result of boolean disjunction of this object and given object.psyXor
(PsyBoolean oBoolean) Returns aboolean
result of boolean exclusive disjunction of this object and given object.Returns a stringfalse
ortrue
depending on this object value.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, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, 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
Returns a stringfalse
ortrue
depending on this object value.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- a string
false
ortrue
depending on this object value
-
psyNot
Returns aboolean
result of boolean negation of this object.- Specified by:
psyNot
in interfacePsyLogical<PsyBoolean>
- Returns:
- a
boolean
result of boolean negation of this object
-
psyOr
Returns aboolean
result of boolean disjunction of this object and given object.- Specified by:
psyOr
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a
boolean
result of boolean disjunction of this object and given object
-
psyAnd
Returns aboolean
result of boolean conjunction of this object and given object.- Specified by:
psyAnd
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a
boolean
result of boolean conjunction of this object and given object
-
psyXor
Returns aboolean
result of boolean exclusive disjunction of this object and given object.- Specified by:
psyXor
in interfacePsyLogical<PsyBoolean>
- Parameters:
oBoolean
- given object.- Returns:
- a
boolean
result of boolean exclusive disjunction of this object and given object
-
compareTo
Description copied from interface:PsyScalar
Compares thisscalar
with the specifiedscalar
for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specifiedscalar
.- Specified by:
compareTo
in interfaceComparable<PsyBoolean>
- Specified by:
compareTo
in interfacePsyScalar<PsyBoolean>
- Parameters:
oBoolean
- thescalar
to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified.
-
hashCode
public int hashCode() -
equals
-
of
Returns aboolean
representing the given boolean value.- Parameters:
bool
- a given value.- Returns:
- a
boolean
representing the given boolean value
-