public final class Functions
extends java.lang.Object
Function
functionality.Modifier and Type | Class and Description |
---|---|
private static class |
Functions.IdentityDoubleFunction |
private static class |
Functions.IncDoubleFunction |
private static class |
Functions.IncIntFunction |
private static class |
Functions.IncLongFunction |
Modifier and Type | Field and Description |
---|---|
private static IntFunction |
decOneIntFunction |
private static LongFunction |
decOneLongFunction |
private static BooleanFunction |
identityBooleanFunction |
private static DoubleFunction |
identityDoubleFunction |
private static Function |
identityFunction |
private static IntFunction |
identityIntFunction |
private static LongFunction |
identityLongFunction |
private static DoubleFunction |
incOneDoubleFunction |
private static IntFunction |
incOneIntFunction |
private static LongFunction |
incOneLongFunction |
private static BooleanFunction |
inverseBooleanFunction |
Modifier | Constructor and Description |
---|---|
private |
Functions() |
Modifier and Type | Method and Description |
---|---|
static IntFunction |
decIntFunction()
Returns an
IntFunction that decrements the input value by one. |
static LongFunction |
decLongFunction()
Returns a
LongFunction that decrements the input value by one. |
static BooleanFunction |
identityBooleanFunction()
Returns a
BooleanFunction that returns the argument. |
static DoubleFunction |
identityDoubleFunction()
Returns an
DoubleFunction that returns its input. |
static Function |
identityFunction()
Returns an
Function that returns its input. |
static IntFunction |
identityIntFunction()
Returns an identity
IntFunction (a function that returns its input value). |
static LongFunction |
identityLongFunction()
Returns an identity
LongFunction (a function that returns its input value). |
static DoubleFunction |
incDoubleFunction()
Returns a
DoubleFunction that increments the input with one. |
static IntFunction |
incIntFunction()
Returns an
IntFunction that increments the input value by one. |
static IntFunction |
incIntFunction(int amount)
Returns a
IntFunction that increments with the given amount. |
static LongFunction |
incLongFunction()
Returns a
LongFunction that increments the input value by one. |
static LongFunction |
incLongFunction(long amount)
Returns a
LongFunction that increments with the given amount. |
static BooleanFunction |
inverseBooleanFunction()
Returns a
BooleanFunction that inverts the argument. |
private static final IntFunction incOneIntFunction
private static final LongFunction incOneLongFunction
private static final IntFunction decOneIntFunction
private static final LongFunction decOneLongFunction
private static final DoubleFunction incOneDoubleFunction
private static final DoubleFunction identityDoubleFunction
private static final BooleanFunction inverseBooleanFunction
private static final BooleanFunction identityBooleanFunction
private static final IntFunction identityIntFunction
private static final LongFunction identityLongFunction
private static final Function identityFunction
public static Function identityFunction()
Function
that returns its input.public static DoubleFunction identityDoubleFunction()
DoubleFunction
that returns its input.public static DoubleFunction incDoubleFunction()
DoubleFunction
that increments the input with one.public static IntFunction identityIntFunction()
IntFunction
(a function that returns its input value). The instance is cached.public static LongFunction identityLongFunction()
LongFunction
(a function that returns its input value). The instance is cached.public static IntFunction incIntFunction()
IntFunction
that increments the input value by one. The instance is cached.public static IntFunction decIntFunction()
IntFunction
that decrements the input value by one. The instance is cached.public static LongFunction incLongFunction()
LongFunction
that increments the input value by one. The instance is cached.public static LongFunction decLongFunction()
LongFunction
that decrements the input value by one. The instance is cached.public static IntFunction incIntFunction(int amount)
IntFunction
that increments with the given amount. For the -1, 0 and 1
a cached instance is returned. In the other cases a new instance is created.amount
- the value to increment with. A negative value does a decrement.public static BooleanFunction inverseBooleanFunction()
BooleanFunction
that inverts the argument.public static BooleanFunction identityBooleanFunction()
BooleanFunction
that returns the argument.public static LongFunction incLongFunction(long amount)
LongFunction
that increments with the given amount. For the -1, 0 and 1
a cached instance is returned. In the other cases a new instance is created.amount
- the value to increment with. A negative value does a decrement.