java.lang.Object
org.zfcj.math.numbers.IntegerAddition
- All Implemented Interfaces:
org.zfcj.math.set.BiFunction<Integer,,Integer, Integer> org.zfcj.math.set.BinaryOperator<Integer>
A
BinaryOperator that adds two Integers and returns
the sum-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies the function to the given input elements t and u and returns the corresponding output elementstatic IntegerAdds the givenIntegers and returns their sumstatic NaturalNumberAdds the givenNaturalNumbers and returns the resultstatic PositiveIntegerAdds the givenPositiveIntegers and returns the result
-
Constructor Details
-
IntegerAddition
public IntegerAddition()
-
-
Method Details
-
apply
Description copied from interface:org.zfcj.math.set.BiFunctionApplies the function to the given input elements t and u and returns the corresponding output element -
calculate
Adds the givenIntegers and returns their sum- Parameters:
i- the first integerj- the second integer- Returns:
- the sum of the given integers
-
calculate
Adds the givenNaturalNumbers and returns the result- Parameters:
i- the first natural numberj- the second natural number- Returns:
- the sum of the given natural numbers
-
calculate
Adds the givenPositiveIntegers and returns the result- Parameters:
i- the first positive integerj- the second positive integer- Returns:
- the sum of the given natural positive integer
-