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:
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
psyDiv(T oArithmetic)
Returns a result of arithmetic division of this object by given object.PsyBoolean
psyIsZero()
Returns a Ψ-boolean
indicating whether this object represents a zero value.T
psyMul(T oArithmetic)
Returns a result of arithmetic multiplication of given object by this object.default PsyBoolean
psyNotZero()
Returns a Ψ-boolean
indicating 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
-
-
-
-
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 Ψ-boolean
indicating whether this object represents a zero value.- Returns:
PsyBoolean.TRUE
if this object represents a zero value, andPsyBoolean.FALSE
otherwise.
-
psyNotZero
default PsyBoolean psyNotZero()
Returns a Ψ-boolean
indicating whether this object represents a non-zero value.- Returns:
PsyBoolean.TRUE
if this object represents a non-zero value, andPsyBoolean.FALSE
otherwise.
-
-