Class NullSafeMapper<F,T>
- java.lang.Object
-
- nl.rkuijt.mapperlib.mapper.single.nullsafe.NullSafeMapper<F,T>
-
- Type Parameters:
F- the type to map from.T- the type to map to.
- All Implemented Interfaces:
Mapper<F,T>
- Direct Known Subclasses:
NullSafeBiMapper,NullSafeMultiMapper
public abstract class NullSafeMapper<F,T> extends java.lang.Object implements Mapper<F,T>
Null-safe unidirectional type mapper.- See Also:
Mapper
-
-
Constructor Summary
Constructors Constructor Description NullSafeMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tfrom(F input)Maps thefromtype to thetotype.protected abstract TnonNullFrom(F input)Maps thefromtype to thetotype.
-
-
-
Method Detail
-
from
public final T from(F input)
Maps thefromtype to thetotype. Does not pass null references to the mapping method.
-
nonNullFrom
protected abstract T nonNullFrom(F input)
Maps thefromtype to thetotype.- Parameters:
input-fromobject.- Returns:
toobject.- See Also:
Mapper.from(Object)
-
-