Package fj.function
Class Doubles
java.lang.Object
fj.function.Doubles
Curried functions over Doubles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAbsolute value.Curried Double addition.Evenness.A function that returns true if the given double is greater than or equal to zero.A function that returns true if the given double is greater than zero.A function that returns true if the given double is less than or equal to zero.A function that returns true if the given double is less than zero.Curried Double multiplication.Negation.Power.Remainder.Curried Double subtraction. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
add
Curried Double addition. -
multiply
Curried Double multiplication. -
subtract
Curried Double subtraction. -
negate
Negation. -
abs
Absolute value. -
remainder
Remainder. -
power
Power. -
even
Evenness. -
gtZero
A function that returns true if the given double is greater than zero. -
gteZero
A function that returns true if the given double is greater than or equal to zero. -
ltZero
A function that returns true if the given double is less than zero. -
lteZero
A function that returns true if the given double is less than or equal to zero.
-
-
Constructor Details
-
Doubles
private Doubles()
-
-
Method Details
-
sum
Sums a list of doubles.- Parameters:
doubles
- A list of doubles to sum.- Returns:
- The sum of the doubless in the list.
-
product
Returns the product of a list of doubles.- Parameters:
doubles
- A list of doubles to multiply together.- Returns:
- The product of the doubles in the list.
-
fromString
A function that converts strings to doubles.- Returns:
- A function that converts strings to doubles.
-