Package coneforest.psylla.core
Interface PsyAdditive<T extends PsyAdditive>
- Type Parameters:
T
- a type of the second operand at binary operation.
- All Superinterfaces:
PsyConvertableToName
,PsyConvertableToString
,PsyObject
- All Known Subinterfaces:
PsyArithmetic<T>
,PsyIntegral
,PsyNumeric
,PsyRational
,PsyRealNumeric
- All Known Implementing Classes:
PsyBigFractional
,PsyBigInteger
,PsyComplex
,PsyFractional
,PsyInteger
,PsyReal
A 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
Fields -
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
-
OPERATORS
-
-
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:
PsyBoolean.TRUE
if this object represents a zero value, andPsyBoolean.FALSE
otherwise.
-
psyNotZero
Returns aboolean
indicating whether this object represents a non-zero value.- Returns:
PsyBoolean.TRUE
if this object represents a non-zero value, andPsyBoolean.FALSE
otherwise.
-