Package coneforest.psylla.core
Class PsyBoolean
- java.lang.Object
-
- coneforest.psylla.core.PsyBoolean
-
- All Implemented Interfaces:
PsyAtomic,PsyConvertableToName,PsyConvertableToString,PsyLogical<PsyBoolean>,PsyObject,PsyScalar<PsyBoolean>
public class PsyBoolean extends Object implements PsyAtomic, PsyScalar<PsyBoolean>, PsyLogical<PsyBoolean>
A representation of Ψ-booleanobject.
-
-
Field Summary
Fields Modifier and Type Field Description static PsyBooleanFALSEA Ψ-booleanconstant, representing false.static PsyBooleanTRUEA Ψ-booleanconstant, representing true.-
Fields inherited from interface coneforest.psylla.core.PsyLogical
OPERATORS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbooleanValue()Returns a boolean value of this object.booleanequals(Object object)inthashCode()PsyBooleanpsyAnd(PsyBoolean oBoolean)Returns a result of boolean conjunction of this object and given object.PsyIntegerpsyCmp(PsyBoolean oBoolean)Compares this object against given object and returns a Ψ-integerindicating the result of the comparison.PsyBooleanpsyEq(PsyObject o)Returns a result of equality test of this object and given object.PsyBooleanpsyGe(PsyBoolean oBoolean)Returns a Ψ-booleanobject representing the result of “greater or equal” comparison of this object and a given object.PsyBooleanpsyGt(PsyBoolean oBoolean)Returns a Ψ-booleanobject representing the result of “greater” comparison of this object and a given object.PsyBooleanpsyLe(PsyBoolean oBoolean)Returns a Ψ-booleanobject representing the result of “less or equal” comparison of this object and a given object.PsyBooleanpsyLt(PsyBoolean oBoolean)Returns a Ψ-booleanobject representing the result of “less” comparison of this object and a given object.PsyBooleanpsyNot()Returns a result of boolean negation of this object.PsyBooleanpsyOr(PsyBoolean oBoolean)Returns a result of boolean disjunction of this object and given object.PsyBooleanpsyXor(PsyBoolean oBoolean)Returns a result of boolean exclusive disjunction of this object and given object.StringtoSyntaxString()static PsyBooleanvalueOf(boolean bool)Returns a Ψ-booleanrepresenting the given boolean 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, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
-
-
-
-
Field Detail
-
FALSE
public static final PsyBoolean FALSE
A Ψ-booleanconstant, representing false.
-
TRUE
public static final PsyBoolean TRUE
A Ψ-booleanconstant, representing true.
-
-
Method Detail
-
booleanValue
public boolean booleanValue()
Returns a boolean value of this object.- Returns:
- a boolean value of this object.
-
toSyntaxString
public String toSyntaxString()
- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- a string
falseortruedepending on this object value.
-
psyNot
public PsyBoolean psyNot()
Returns a result of boolean negation of this object.- Specified by:
psyNotin interfacePsyLogical<PsyBoolean>- Returns:
- a result.
-
psyOr
public PsyBoolean psyOr(PsyBoolean oBoolean)
Returns a result of boolean disjunction of this object and given object.- Specified by:
psyOrin interfacePsyLogical<PsyBoolean>- Parameters:
oBoolean- given object.- Returns:
- a result.
-
psyAnd
public PsyBoolean psyAnd(PsyBoolean oBoolean)
Returns a result of boolean conjunction of this object and given object.- Specified by:
psyAndin interfacePsyLogical<PsyBoolean>- Parameters:
oBoolean- given object.- Returns:
- a result.
-
psyXor
public PsyBoolean psyXor(PsyBoolean oBoolean)
Returns a result of boolean exclusive disjunction of this object and given object.- Specified by:
psyXorin interfacePsyLogical<PsyBoolean>- Parameters:
oBoolean- given object.- Returns:
- a result.
-
psyEq
public PsyBoolean psyEq(PsyObject o)
Returns a result of equality test of this object and given object.
-
psyCmp
public PsyInteger psyCmp(PsyBoolean oBoolean)
Description copied from interface:PsyScalarCompares this object against given object and returns a Ψ-integerindicating 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:
psyCmpin interfacePsyScalar<PsyBoolean>- Parameters:
oBoolean- an object with which this object is compared.- Returns:
- a result of the comparison.
-
psyLt
public PsyBoolean psyLt(PsyBoolean oBoolean)
Description copied from interface:PsyScalarReturns a Ψ-booleanobject representing the result of “less” comparison of this object and a given object.- Specified by:
psyLtin 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
public PsyBoolean psyLe(PsyBoolean oBoolean)
Description copied from interface:PsyScalarReturns a Ψ-booleanobject representing the result of “less or equal” comparison of this object and a given object.- Specified by:
psyLein 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
public PsyBoolean psyGt(PsyBoolean oBoolean)
Description copied from interface:PsyScalarReturns a Ψ-booleanobject representing the result of “greater” comparison of this object and a given object.- Specified by:
psyGtin interfacePsyScalar<PsyBoolean>- Parameters:
oBoolean- an object with which this object is compared.- Returns:
- a Ψ-
booleanresult of comparison.
-
psyGe
public PsyBoolean psyGe(PsyBoolean oBoolean)
Description copied from interface:PsyScalarReturns a Ψ-booleanobject representing the result of “greater or equal” comparison of this object and a given object.- Specified by:
psyGein interfacePsyScalar<PsyBoolean>- Parameters:
oBoolean- an object with which this object is compared.- Returns:
- a Ψ-
booleanresult of comparison.
-
valueOf
public static PsyBoolean valueOf(boolean bool)
Returns a Ψ-booleanrepresenting the given boolean value.- Parameters:
bool- a given value.- Returns:
- a Ψ-
booleanobject.
-
-