public final class Integers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static F<java.lang.Integer,java.lang.Integer> |
abs
Absolute value.
|
static F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> |
add
Curried Integer addition.
|
static F<java.lang.Integer,java.lang.Boolean> |
even
Evenness.
|
static F<java.lang.Integer,java.lang.Boolean> |
gteZero
A function that returns true if the given integer is greater than or equal to zero.
|
static F<java.lang.Integer,java.lang.Boolean> |
gtZero
A function that returns true if the given integer is greater than zero.
|
static F<java.lang.Integer,java.lang.Boolean> |
lteZero
A function that returns true if the given integer is less than or equal to zero.
|
static F<java.lang.Integer,java.lang.Boolean> |
ltZero
A function that returns true if the given integer is less than zero.
|
static F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> |
multiply
Curried Integer multiplication.
|
static F<java.lang.Integer,java.lang.Integer> |
negate
Negation.
|
static F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> |
power
Power.
|
static F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> |
remainder
Remainder.
|
static F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> |
subtract
Curried Integer subtraction.
|
Modifier and Type | Method and Description |
---|---|
static F<java.lang.String,Option<java.lang.Integer>> |
fromString()
A function that converts strings to integers.
|
static int |
product(List<java.lang.Integer> ints)
Returns the product of a list of integers.
|
static int |
sum(List<java.lang.Integer> ints)
Sums a list of integers.
|
public static final F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> add
public static final F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> multiply
public static final F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> subtract
public static final F<java.lang.Integer,java.lang.Integer> negate
public static final F<java.lang.Integer,java.lang.Integer> abs
public static final F<java.lang.Integer,F<java.lang.Integer,java.lang.Integer>> remainder
public static final F<java.lang.Integer,java.lang.Boolean> even
public static final F<java.lang.Integer,java.lang.Boolean> gtZero
public static final F<java.lang.Integer,java.lang.Boolean> gteZero
public static final F<java.lang.Integer,java.lang.Boolean> ltZero
public static final F<java.lang.Integer,java.lang.Boolean> lteZero
public static int sum(List<java.lang.Integer> ints)
ints
- A list of integers to sum.public static int product(List<java.lang.Integer> ints)
ints
- A list of integers to multiply together.