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

@Type("additive") public interface PsyAdditive<T extends PsyAdditive> extends PsyObject
The representation of additive, a type of object that is an operand of additive operation. This interface declares methods for addition, subtraction and negation.
  • Field Details

  • Method Details

    • psyNeg

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

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

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

      PsyBoolean psyIsZero()
      Returns a boolean indicating whether this object represents a zero value.
      Returns:
      a boolean indicating whether this object represents a zero value.
    • psyNonZero

      default PsyBoolean psyNonZero()
      Returns a boolean indicating whether this object represents a non-zero value.
      Returns:
      a boolean indicating whether this object represents a non-zero value.