Module coneforest.psylla
Package coneforest.psylla.core
Interface PsyAdditive<T extends PsyAdditive>
- 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 arithmetic
operation. This interface declares methods for addition, subtraction and negation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of theadd
operator.static final ContextAction
Context action of theiszero
operator.static final ContextAction
Context action of theneg
operator.static final ContextAction
Context action of thenonzero
operator.static final ContextAction
Context action of thesub
operator.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 TypeMethodDescriptionReturns anadditive
representing the result of arithmetic addition of given object to this object.Returns aboolean
indicating whether this object represents a zero value.psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.default PsyBoolean
Returns aboolean
indicating whether this object represents a non-zero value.Returns anadditive
representing the result of arithmetic subtraction of given object from this object.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_ADD
Context action of theadd
operator. -
PSY_ISZERO
Context action of theiszero
operator. -
PSY_NEG
Context action of theneg
operator. -
PSY_NONZERO
Context action of thenonzero
operator. -
PSY_SUB
Context action of thesub
operator.
-
-
Method Details
-
psyNeg
T psyNeg()Returns anadditive
representing the result of arithmetic negation of this object.- Returns:
- a negation.
-
psyAdd
Returns anadditive
representing the result of arithmetic addition of given object to this object.- Parameters:
oAdditive
- given object.- Returns:
- a sum.
-
psySub
Returns anadditive
representing the result of arithmetic subtraction of given object from this object.- Parameters:
oAdditive
- given object.- Returns:
- a difference.
-
psyIsZero
PsyBoolean psyIsZero()Returns aboolean
indicating whether this object represents a zero value.- Returns:
- a
boolean
indicating whether this object represents a zero value.
-
psyNonZero
Returns aboolean
indicating whether this object represents a non-zero value.- Returns:
- a
boolean
indicating whether this object represents a non-zero value.
-