Package com.gengoai.function
Class Funcs.When<I,O>
- java.lang.Object
-
- com.gengoai.function.Funcs.When<I,O>
-
- Type Parameters:
I
- the type parameterO
- the type parameter
- All Implemented Interfaces:
SerializableFunction<I,O>
,Serializable
,Function<I,O>
- Enclosing class:
- Funcs
public static class Funcs.When<I,O> extends Object implements SerializableFunction<I,O>
The type When.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description O
apply(I i)
SerializableFunction<I,O>
otherwise(SerializableFunction<? super I,? extends O> falseAction)
Otherwise function.SerializableFunction<I,O>
otherwise(O falseValue)
Otherwise function.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.function.SerializableFunction
andThen, asConsumer, compose
-
-
-
-
Method Detail
-
otherwise
public SerializableFunction<I,O> otherwise(SerializableFunction<? super I,? extends O> falseAction)
Otherwise function.- Parameters:
falseAction
- the false action- Returns:
- the function
-
otherwise
public SerializableFunction<I,O> otherwise(O falseValue)
Otherwise function.- Parameters:
falseValue
- the false value- Returns:
- the function
-
-