Module coneforest.psylla
Package coneforest.psylla.core
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
The representation of
additive, a type of object that is an operand of additive
operation. This interface declares methods for addition, subtraction and negation.-
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 coneforest.psylla.core.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 coneforest.psylla.core.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
Returns theadditiveresult of arithmetic addition of specified object to this object.- Parameters:
oAdditive- the specified object.- Returns:
- the
additiveresult of arithmetic addition of specified object to this object
-
psySub
Returns theadditiveresult of arithmetic subtraction of specified object from this object.- Parameters:
oAdditive- the specified object.- Returns:
- the
additiveresult of arithmetic subtraction of specified object from this object
-
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()
-