- Type Parameters:
T- a type of the second operand at binary comparison operation.
- All Superinterfaces:
Comparable<T>,PsyObject
- All Known Subinterfaces:
PsyIntegral,PsyRational,PsyRealNumeric,PsyTextual
- All Known Implementing Classes:
PsyBigFraction,PsyBigInteger,PsyBoolean,PsyCommand,PsyFraction,PsyInteger,PsyName,PsyReal,PsyString
The representation of
scalar, a type bringing total ordering to implementing Psylla
type. This interface declares methods for comparison.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thecmpoperator.static final ContextActionContext action of thegeoperator.static final ContextActionContext action of thegtoperator.static final ContextActionContext action of theleoperator.static final ContextActionContext action of theltoperator.static final ContextActionContext action of themaxoperator.static final ContextActionContext action of theminoperator.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 TypeMethodDescriptionintdefault PsyIntegerCompares this object against given object and returns anintegerindicating the result of the comparison.default PsyBooleanReturns abooleanobject representing the result of “greater or equal” comparison of this object and a given object.default PsyBooleanReturns abooleanobject representing the result of “greater” comparison of this object and a given object.default PsyBooleanReturns abooleanobject representing the result of “less or equal” comparison of this object and a given object.default PsyBooleanReturns abooleanobject representing the result of “less” comparison of this object and a given object.default PsyScalarReturns the maximum of thisscalarand givenscalar.default PsyScalarReturns the minimum of thisscalarand givenscalar.Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_CMP
Context action of thecmpoperator. -
PSY_GE
Context action of thegeoperator. -
PSY_GT
Context action of thegtoperator. -
PSY_LE
Context action of theleoperator. -
PSY_LT
Context action of theltoperator. -
PSY_MAX
Context action of themaxoperator. -
PSY_MIN
Context action of theminoperator.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<T extends PsyScalar>
-
psyLt
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
booleanvalue indicating if this object is less than given object.
-
psyLe
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
booleanvalue indicating if this object is less than or equal to given object.
-
psyGt
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
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
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.
-
psyMin
Returns the minimum of thisscalarand givenscalar.- Parameters:
oScalar- the givenscalar.- Returns:
- the minimum of this
scalarand givenscalar.
-
psyMax
Returns the maximum of thisscalarand givenscalar.- Parameters:
oScalar- the givenscalar.- Returns:
- the maximum of this
scalarand givenscalar.
-