Package fj.function
Class Doubles
- java.lang.Object
-
- fj.function.Doubles
-
public final class Doubles extends java.lang.ObjectCurried functions over Doubles.
-
-
Field Summary
Fields Modifier and Type Field Description static F<java.lang.Double,java.lang.Double>absAbsolute value.static F<java.lang.Double,F<java.lang.Double,java.lang.Double>>addCurried Double addition.static F<java.lang.Double,java.lang.Boolean>evenEvenness.static F<java.lang.Double,java.lang.Boolean>gteZeroA function that returns true if the given double is greater than or equal to zero.static F<java.lang.Double,java.lang.Boolean>gtZeroA function that returns true if the given double is greater than zero.static F<java.lang.Double,java.lang.Boolean>lteZeroA function that returns true if the given double is less than or equal to zero.static F<java.lang.Double,java.lang.Boolean>ltZeroA function that returns true if the given double is less than zero.static F<java.lang.Double,F<java.lang.Double,java.lang.Double>>multiplyCurried Double multiplication.static F<java.lang.Double,java.lang.Double>negateNegation.static F<java.lang.Double,F<java.lang.Double,java.lang.Double>>powerPower.static F<java.lang.Double,F<java.lang.Double,java.lang.Double>>remainderRemainder.static F<java.lang.Double,F<java.lang.Double,java.lang.Double>>subtractCurried Double subtraction.
-
Constructor Summary
Constructors Modifier Constructor Description privateDoubles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static F<java.lang.String,Option<java.lang.Double>>fromString()A function that converts strings to doubles.static doubleproduct(List<java.lang.Double> doubles)Returns the product of a list of doubles.static doublesum(List<java.lang.Double> doubles)Sums a list of doubles.
-
-
-
Field Detail
-
add
public static final F<java.lang.Double,F<java.lang.Double,java.lang.Double>> add
Curried Double addition.
-
multiply
public static final F<java.lang.Double,F<java.lang.Double,java.lang.Double>> multiply
Curried Double multiplication.
-
subtract
public static final F<java.lang.Double,F<java.lang.Double,java.lang.Double>> subtract
Curried Double subtraction.
-
negate
public static final F<java.lang.Double,java.lang.Double> negate
Negation.
-
abs
public static final F<java.lang.Double,java.lang.Double> abs
Absolute value.
-
remainder
public static final F<java.lang.Double,F<java.lang.Double,java.lang.Double>> remainder
Remainder.
-
even
public static final F<java.lang.Double,java.lang.Boolean> even
Evenness.
-
gtZero
public static final F<java.lang.Double,java.lang.Boolean> gtZero
A function that returns true if the given double is greater than zero.
-
gteZero
public static final F<java.lang.Double,java.lang.Boolean> gteZero
A function that returns true if the given double is greater than or equal to zero.
-
ltZero
public static final F<java.lang.Double,java.lang.Boolean> ltZero
A function that returns true if the given double is less than zero.
-
lteZero
public static final F<java.lang.Double,java.lang.Boolean> lteZero
A function that returns true if the given double is less than or equal to zero.
-
-
Method Detail
-
sum
public static double sum(List<java.lang.Double> doubles)
Sums a list of doubles.- Parameters:
doubles- A list of doubles to sum.- Returns:
- The sum of the doubless in the list.
-
product
public static double product(List<java.lang.Double> doubles)
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.
-
-