public class IfConverter<I,O>
extends java.lang.Object
implements org.srplib.conversion.Converter<I,O>
Input value is converted to boolean using following rules:
| Constructor and Description |
|---|
IfConverter(O trueValue,
O falseValue)
Creates converter using specified true an false values.
|
| Modifier and Type | Method and Description |
|---|---|
O |
convert(I input) |
static <I,O> IfConverter<I,O> |
ifConverter(O trueValue,
O falseValue)
An alternative to constructor.
|
public static <I,O> IfConverter<I,O> ifConverter(O trueValue, O falseValue)
I - input value typeO - output value typetrueValue - a value to be returned if expression is true. null is legal value.falseValue - a value to be returned if expression is false. null is legal value.