- 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,PsyFraction,PsyInteger,PsyName,PsyReal,PsyString,PsyStringBuffer
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_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Method Summary
Modifier and TypeMethodDescriptionintCompares thisscalarwith the specifiedscalarfor order.default PsyIntegerCompares thisscalaragainst givenscalarand returns anintegerindicating the result of the comparison.default PsyBooleanReturns abooleanobject representing the result of “greater or equal” comparison of thisscalarand a givenscalar.default PsyBooleanReturns abooleanobject representing the result of “greater” comparison of thisscalarand a givenscalar.default PsyBooleanReturns abooleanobject representing the result of “less or equal” comparison of thisscalarand a givenscalar.default PsyBooleanReturns abooleanobject representing the result of “less” comparison of thisscalarand a givenscalar.Returns the maximum of thisscalarand givenscalar.Returns the minimum of thisscalarand givenscalar.Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, 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
Compares thisscalarwith the specifiedscalarfor 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:
compareToin interfaceComparable<T extends PsyScalar<T>>- Parameters:
oScalar- thescalarto be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified.
-
psyLt
Returns abooleanobject representing the result of “less” comparison of thisscalarand a givenscalar.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanobject representing the result of “less” comparison of thisscalarand a givenscalar
-
psyLe
Returns abooleanobject representing the result of “less or equal” comparison of thisscalarand a givenscalar.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanobject representing the result of “less or equal” comparison of thisscalarand a givenscalar
-
psyGt
Returns abooleanobject representing the result of “greater” comparison of thisscalarand a givenscalar.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanobject representing the result of “greater” comparison of thisscalarand a givenscalar
-
psyGe
Returns abooleanobject representing the result of “greater or equal” comparison of thisscalarand a givenscalar.- Parameters:
oScalar- an object with which this object is compared.- Returns:
- a
booleanobject representing the result of “greater or equal” comparison of thisscalarand a givenscalar
-
psyCmp
Compares thisscalaragainst givenscalarand 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
-