Package coneforest.psylla.core
Interface PsyScalar<T extends PsyScalar>
-
- Type Parameters:
T- a type of the second operand at binary comparison operation.
- All Superinterfaces:
PsyConvertableToName,PsyConvertableToString,PsyObject
- All Known Subinterfaces:
PsyIntegral,PsyRealNumeric,PsyTextual
- All Known Implementing Classes:
PsyBigInteger,PsyBoolean,PsyCommand,PsyInteger,PsyName,PsyReal,PsyString
public interface PsyScalar<T extends PsyScalar> extends PsyObject
A representation ofscalar, a type bringing total ordering to implementing Psylla type. This interface declares methods for comparison.
-
-
Field Summary
Fields Modifier and Type Field Description static PsyOperator[]OPERATORS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PsyIntegerpsyCmp(T oScalar)Compares this object against given object and returns anintegerindicating the result of the comparison.PsyBooleanpsyGe(T oScalar)Returns abooleanobject representing the result of “greater or equal” comparison of this object and a given object.PsyBooleanpsyGt(T oScalar)Returns abooleanobject representing the result of “greater” comparison of this object and a given object.PsyBooleanpsyLe(T oScalar)Returns abooleanobject representing the result of “less or equal” comparison of this object and a given object.PsyBooleanpsyLt(T oScalar)Returns abooleanobject representing the result of “less” comparison of this object and a given object.default PsyScalarpsyMax(T oScalar)default PsyScalarpsyMin(T oScalar)-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
-
-
-
Field Detail
-
OPERATORS
static final PsyOperator[] OPERATORS
-
-
Method Detail
-
psyLt
PsyBoolean psyLt(T oScalar)
Returns abooleanobject representing the result of “less” comparison of this object and a given object.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a Ψ boolean value indicating if this object is less than given object.
-
psyLe
PsyBoolean psyLe(T oScalar)
Returns abooleanobject representing the result of “less or equal” comparison of this object and a given object.- Parameters:
oScalar- 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
PsyBoolean psyGt(T oScalar)
Returns abooleanobject representing the result of “greater” comparison of this object and a given object.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanresult of comparison.
-
psyGe
PsyBoolean psyGe(T oScalar)
Returns abooleanobject representing the result of “greater or equal” comparison of this object and a given object.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanresult of comparison.
-
psyCmp
PsyInteger psyCmp(T oScalar)
Compares this object against given object and returns anintegerindicating 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.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a result of the comparison.
-
-