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 Integer
s 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 Integer
Adds the givenInteger
s and returns their sumstatic NaturalNumber
Adds the givenNaturalNumber
s and returns the resultstatic PositiveInteger
Adds the givenPositiveInteger
s and returns the result
-
Constructor Details
-
IntegerAddition
public IntegerAddition()
-
-
Method Details
-
apply
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 -
calculate
Adds the givenInteger
s and returns their sum- Parameters:
i
- the first integerj
- the second integer- Returns:
- the sum of the given integers
-
calculate
Adds the givenNaturalNumber
s 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 givenPositiveInteger
s and returns the result- Parameters:
i
- the first positive integerj
- the second positive integer- Returns:
- the sum of the given natural positive integer
-