Package coneforest.psylla.core
Interface PsyArithmetic<T extends PsyArithmetic>
-
- Type Parameters:
T- a type of the second operand at binary operation.
- All Superinterfaces:
PsyAdditive<T>,PsyConvertableToName,PsyConvertableToString,PsyObject
- All Known Subinterfaces:
PsyIntegral,PsyNumeric,PsyRealNumeric
- All Known Implementing Classes:
PsyBigInteger,PsyComplex,PsyInteger,PsyReal
public interface PsyArithmetic<T extends PsyArithmetic> extends PsyAdditive<T>
A representation of Ψ-arithmetic, a type of object that is an operand of arithmetic operation. This interface declares methods for multiplication, division.
-
-
Field Summary
Fields Modifier and Type Field Description static PsyOperator[]OPERATORS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TpsyDiv(T oArithmetic)Returns a result of arithmetic division of this object by given object.PsyBooleanpsyIsZero()Returns a Ψ-booleanindicating whether this object represents a zero value.TpsyMul(T oArithmetic)Returns a result of arithmetic multiplication of given object by this object.default PsyBooleanpsyNotZero()Returns a Ψ-booleanindicating whether this object represents a non-zero value.-
Methods inherited from interface coneforest.psylla.core.PsyAdditive
psyAdd, psyNeg, psySub
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
-
-
-
Field Detail
-
OPERATORS
static final PsyOperator[] OPERATORS
-
-
Method Detail
-
psyMul
T psyMul(T oArithmetic)
Returns a result of arithmetic multiplication of given object by this object.- Parameters:
oArithmetic- a given object.- Returns:
- a product.
-
psyDiv
T psyDiv(T oArithmetic)
Returns a result of arithmetic division of this object by given object.- Parameters:
oArithmetic- a given object.- Returns:
- a fraction.
-
psyIsZero
PsyBoolean psyIsZero()
Returns a Ψ-booleanindicating whether this object represents a zero value.- Returns:
PsyBoolean.TRUEif this object represents a zero value, andPsyBoolean.FALSEotherwise.
-
psyNotZero
default PsyBoolean psyNotZero()
Returns a Ψ-booleanindicating whether this object represents a non-zero value.- Returns:
PsyBoolean.TRUEif this object represents a non-zero value, andPsyBoolean.FALSEotherwise.
-
-