Class IntegerModulo

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

public class IntegerModulo extends Object implements org.zfcj.math.set.BinaryOperator<Integer>
A BinaryOperator that divides one Integers by another and returns the remainder
  • Constructor Details

    • IntegerModulo

      public IntegerModulo()
  • Method Details

    • apply

      public Integer apply(Integer t, Integer u)
      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:
      t - an element of the first set
      u - an element of the second set
    • calculate

      public static Integer calculate(Integer dividend, Integer divisor)
      Calculates the remainder of dividing the given dividend by the given divisor
      Parameters:
      dividend - the number being divided
      divisor - the number to divide by
      Returns:
      the quotient of division