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