Interface PsyAdditive<T extends PsyAdditive<T>>
- Type Parameters:
T- a type of the second operand at binary operation.
- All Superinterfaces:
PsyObject
- All Known Subinterfaces:
PsyArithmetic<T>, PsyIntegral, PsyNumeric, PsyRational, PsyRealNumeric
- All Known Implementing Classes:
PsyBigFraction, PsyBigInteger, PsyComplex, PsyFraction, PsyInteger, PsyReal
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theaddoperator.static final ContextActionContext action of theiszerooperator.static final ContextActionContext action of thenegoperator.static final ContextActionContext action of thenonzerooperator.static final ContextActionContext action of thesuboperator.Fields inherited from interface PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Method Summary
Modifier and TypeMethodDescriptionbooleanisZero()Returns theadditiveresult of arithmetic addition of specified object to this object.default PsyBooleanReturns abooleanindicating whether this object represents a zero value.psyNeg()Returns theadditiveresult of arithmetic negation of this object.default PsyBooleanReturns abooleanindicating whether this object represents a non-zero value.Returns theadditiveresult of arithmetic subtraction of specified object from this object.Methods inherited from interface PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_ADD
Context action of theaddoperator. -
PSY_ISZERO
Context action of theiszerooperator. -
PSY_NEG
Context action of thenegoperator. -
PSY_NONZERO
Context action of thenonzerooperator. -
PSY_SUB
Context action of thesuboperator.
-
-
Method Details
-
psyNeg
T psyNeg()Returns theadditiveresult of arithmetic negation of this object.- Returns:
- the
additiveresult of arithmetic negation of this object
-
psyAdd
-
psySub
-
psyIsZero
Returns abooleanindicating whether this object represents a zero value.- Returns:
- a
booleanindicating whether this object represents a zero value
-
psyNonZero
Returns abooleanindicating whether this object represents a non-zero value.- Returns:
- a
booleanindicating whether this object represents a non-zero value
-
isZero
boolean isZero()
-