Interface Arithmetic<A,​R>

Type Parameters:
A - the type of the absolute value
R - the type of the relative value
All Known Implementing Classes:
NumberArithmetic, VectorArithmethic

public interface Arithmetic<A,​R>
Represents arithmetic for certain two types. Multiplication, division and power of methods are optional and may throw UnsupportedOperationExceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    add​(A value, R difference)
     
    difference​(A first, A second)
     
    divide​(A value, R divider)
     
    multiply​(A value, R multiplier)
     
    power​(A value, R exponent)
     
    subtract​(A value, R difference)
     
  • Method Details

    • difference

      R difference(A first, A second)
    • add

      A add(A value, R difference)
    • subtract

      A subtract(A value, R difference)
    • multiply

      A multiply(A value, R multiplier)
    • divide

      A divide(A value, R divider)
    • power

      A power(A value, R exponent)