@FunctionalInterface
public interface Convertlet<F,T>
Convertlet
provides a single conversion from an object of a
certain type to an object of a different type.
Convertlet
s are provided by ConversionProvider
in an
ArooaDescriptor
.
Convertlet
s are used in sequences. A conversion from Float to Integer
uses to Convertlet
s. Float to Number and Number to Integer. If
a convertlet isn't to be used as part of a sequence it should be
declared as a FinalConvertlet
.
A Convertlet can always assume that they will not be used for an inappropriate conversion and so do not have to do any type checking.
Modifier and Type | Method and Description |
---|---|
T |
convert(F from)
Convert from one thing to another.
|
T convert(F from) throws ArooaConversionException
from
- The from object, never null.ArooaConversionException
- If conversion failed - for instance
a number or date can't be parsed.