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

public interface PsyAdditive<T extends PsyAdditive> extends PsyObject
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 Details

  • Method Details

    • psyNeg

      T psyNeg()
      Returns an additive representing the result of arithmetic negation of this object.
      Returns:
      a negation.
    • psyAdd

      T psyAdd(T oAdditive)
      Returns an additive representing the result of arithmetic addition of given object to this object.
      Parameters:
      oAdditive - given object.
      Returns:
      a sum.
    • psySub

      T psySub(T oAdditive)
      Returns an additive representing the result of arithmetic subtraction of given object from this object.
      Parameters:
      oAdditive - given object.
      Returns:
      a difference.
    • psyIsZero

      PsyBoolean psyIsZero()
      Returns a boolean indicating whether this object represents a zero value.
      Returns:
      PsyBoolean.TRUE if this object represents a zero value, and PsyBoolean.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, and PsyBoolean.FALSE otherwise.