F - Original type, on which the transformation is applied (FROM).T - Result type, that the transformation returns (TO).@FunctionalInterface public interface Transformation<F,T> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
T |
apply(F from)
Apply the transformation.
|
static <F,T> Transformation<F,T> |
dontTransformNull(Transformation<F,T> transformation) |
default String |
getMethodName() |
T apply(F from) throws Exception
from - Original object, on which to apply the transformation.Exception - Can throw any exception during transformation.default String getMethodName()
static <F,T> Transformation<F,T> dontTransformNull(Transformation<F,T> transformation)
Copyright © 2021. All rights reserved.