public class IfFunctions
extends java.lang.Object
Function
instances which return specific values
(or Supplier
or Function
instances) when certain predicates are satisfied,
tested in order and returning the first matching,
with support for an "else" default value if none are satisfied (null by default).Modifier and Type | Class and Description |
---|---|
static class |
IfFunctions.IfFunction<I,O> |
static class |
IfFunctions.IfFunctionBuilder<I,O> |
static class |
IfFunctions.IfFunctionBuilderApplying<I,O> |
static class |
IfFunctions.IfFunctionBuilderApplyingFirst<I> |
Constructor and Description |
---|
IfFunctions() |
Modifier and Type | Method and Description |
---|---|
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifEquals(I test) |
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifNotEquals(I test) |
static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> |
ifPredicate(<any> test) |
static <I,O> IfFunctions.IfFunctionBuilder<I,O> |
newInstance(java.lang.Class<I> testType,
java.lang.Class<O> returnType) |
public static <I,O> IfFunctions.IfFunctionBuilder<I,O> newInstance(java.lang.Class<I> testType, java.lang.Class<O> returnType)
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifPredicate(<any> test)
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifEquals(I test)
public static <I> IfFunctions.IfFunctionBuilderApplyingFirst<I> ifNotEquals(I test)