-
- Type Parameters:
I- the actual input type.O- the actual output type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Conversion<I,O>Functional interface used to define an conversion step during an input validation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable OcheckAndApply(I input)Checks the given input value and applies the conversion.
-
-
-
Method Detail
-
checkAndApply
@Nullable O checkAndApply(I input) throws java.lang.Exception
Checks the given input value and applies the conversion.- Parameters:
input- the input value to convert.- Returns:
- the converted value or
nullif the input value is not valid. - Throws:
java.lang.Exception- if the conversion fails.
-
-