java.lang.Object
org.zfcj.math.numbers.RationalAddition
- All Implemented Interfaces:
org.zfcj.math.set.BiFunction<RationalNumber,
,RationalNumber, RationalNumber> org.zfcj.math.set.BinaryOperator<RationalNumber>
public class RationalAddition
extends Object
implements org.zfcj.math.set.BinaryOperator<RationalNumber>
A
BinaryOperator
that add two RationalNumber
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 RationalNumber
Calculates the sum of addition of the givenRationalNumber
summands
-
Constructor Details
-
RationalAddition
public RationalAddition()
-
-
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- Specified by:
apply
in interfaceorg.zfcj.math.set.BiFunction<RationalNumber,
RationalNumber, RationalNumber> - Parameters:
t
- an element of the first setu
- an element of the second set
-
calculate
Calculates the sum of addition of the givenRationalNumber
summands- Parameters:
t
- the first summandu
- the second summand- Returns:
- the sum of the given rational numbers
-