Class IntegerSubtraction

java.lang.Object
org.zfcj.math.numbers.IntegerSubtraction
All Implemented Interfaces:
org.zfcj.math.set.BiFunction<Integer,Integer,Integer>, org.zfcj.math.set.BinaryOperator<Integer>

public class IntegerSubtraction extends Object implements org.zfcj.math.set.BinaryOperator<Integer>
A BinaryOperator that subtracts one Integer from another and returns the difference
  • Constructor Details

    • IntegerSubtraction

      public IntegerSubtraction()
  • Method Details

    • apply

      public Integer apply(Integer minuend, Integer subtrahend)
      Description copied from interface: org.zfcj.math.set.BiFunction
      Applies the function to the given input elements t and u and returns the corresponding output element
      Specified by:
      apply in interface org.zfcj.math.set.BiFunction<Integer,Integer,Integer>
      Parameters:
      minuend - an element of the first set
      subtrahend - an element of the second set
    • calculate

      public static Integer calculate(Integer minuend, Integer subtrahend)
      Subtracts the given sutrahend from the given minued returning their difference
      Parameters:
      minuend - the first integer
      subtrahend - the second integer
      Returns:
      the difference of the given integers