public final class Fields
extends java.lang.Object
Field.| Modifier and Type | Method and Description |
|---|---|
static <T,R> Field<R> |
apply(java.util.function.BiFunction<T,java.lang.Object[],R> fun,
boolean fieldTarget,
int[] fieldIndices,
T target,
java.lang.Object... args) |
static Field<java.lang.Object> |
apply(java.util.function.BinaryOperator<java.lang.Object> fun,
int[] fields,
java.lang.Object a,
java.lang.Object b) |
static <R> Field<R> |
apply(java.util.function.Function<java.lang.Object[],R> fun,
boolean fieldTarget,
int[] fieldIndexes,
java.lang.Object target,
java.lang.Object... args) |
static <R> Field<R> |
apply(java.util.function.Function<java.lang.Object[],R> fun,
int[] fieldIndexes,
java.lang.Object... args) |
static <R> Field<R> |
apply(TriFunction<java.lang.Object,java.lang.Object,java.lang.Object,R> fun,
int[] fields,
java.lang.Object a,
java.lang.Object b,
java.lang.Object c) |
static Field<java.lang.Object> |
applyWithSingleParam(java.util.function.UnaryOperator<java.lang.Object> fun,
int[] fields,
java.lang.Object a) |
public static Field<java.lang.Object> applyWithSingleParam(java.util.function.UnaryOperator<java.lang.Object> fun, int[] fields, java.lang.Object a)
fun - the UnaryOperator to applyfields - an array of integers containing the indexes of the arguments
that are fieldsa - the single parameterpublic static Field<java.lang.Object> apply(java.util.function.BinaryOperator<java.lang.Object> fun, int[] fields, java.lang.Object a, java.lang.Object b)
fun - the 2-ary function to apply, in form of a
BinaryOperatorfields - an array of integers containing the indexes of the arguments
that are fieldsa - the first parameterb - the second parameterpublic static <R> Field<R> apply(TriFunction<java.lang.Object,java.lang.Object,java.lang.Object,R> fun, int[] fields, java.lang.Object a, java.lang.Object b, java.lang.Object c)
R - result field typefun - the TriFunction to applyfields - an array of integers containing the indexes of the arguments
that are fieldsa - the first parameterb - the second parameterc - the third parameterpublic static <R> Field<R> apply(java.util.function.Function<java.lang.Object[],R> fun, int[] fieldIndexes, java.lang.Object... args)
R - result field typefun - the function to apply.fieldIndexes - the indexes of which among the arguments are fieldsargs - the argumentsFunction to
the target and the argumentspublic static <R> Field<R> apply(java.util.function.Function<java.lang.Object[],R> fun, boolean fieldTarget, int[] fieldIndexes, java.lang.Object target, java.lang.Object... args)
R - result field typefun - the function to apply.fieldTarget - true if the target is a fieldfieldIndexes - the indexes of which among the arguments are fieldstarget - the object this method will be invoked onargs - the argumentsFunction to
the target and the argumentspublic static <T,R> Field<R> apply(java.util.function.BiFunction<T,java.lang.Object[],R> fun, boolean fieldTarget, int[] fieldIndices, T target, java.lang.Object... args)
T - input field typeR - result field typefun - the function to apply. It must accept as a first argument
the data type carried by the target, and an Object array
as second argument (namely, it is a vararg)fieldTarget - true if the target is a fieldfieldIndices - the indexes of which among the arguments are fieldstarget - the object this method will be invoked onargs - the argumentsBiFunction
to the target and the arguments