Package eu.bandm.tools.util
Class Operators.IfThenElseFun<X,Y>
java.lang.Object
eu.bandm.tools.util.Operators.IfThenElseFun<X,Y>
- All Implemented Interfaces:
Operators.Fun<X,
Y>
- Enclosing class:
- Operators
-
Field Summary
Modifier and TypeFieldDescription(package private) final Operators.Test<? super X>
(package private) final Operators.Fun<? super X,
? extends Y> (package private) final Operators.Fun<? super X,
? extends Y> -
Constructor Summary
ConstructorDescriptionIfThenElseFun
(Operators.Test<? super X> c, Operators.Fun<? super X, ? extends Y> f, Operators.Fun<? super X, ? extends Y> g) -
Method Summary
-
Field Details
-
c
-
f
-
g
-
-
Constructor Details
-
IfThenElseFun
public IfThenElseFun(Operators.Test<? super X> c, Operators.Fun<? super X, ? extends Y> f, Operators.Fun<? super X, ? extends Y> g)
-
-
Method Details
-
apply
Description copied from interface:Operators.Fun
Compute an output element from an input element. Computation should be stateless and thread-safe, i.e.,f.apply(x)
for a given fixed function objectf
and input elementx
should not vary unless the observable state ofx
varies.- Specified by:
apply
in interfaceOperators.Fun<X,
Y> - Parameters:
x
- an input element.- Returns:
- an output element.
-
toString
-