T
- The type of object that this delegate converts the format of.TFormatType
- The class of the format object itself. This can be a base class.@FunctionalInterface public static interface TryFormatConversionCallback.Function<T,TFormatType>
Modifier and Type | Method and Description |
---|---|
boolean |
invoke(T from,
TFormatType targetFormat,
T[] result)
A delegate to try converting a
T from one format to
another. |
boolean invoke(T from, TFormatType targetFormat, @Nonnull T[] result)
T
from one format to
another.from
- The instance of T
to convert.targetFormat
- The TFormatType
to convert to.result
- On input, an array with one element. On return, the array is populated with
the resulting instance of T
equivalent to from
, in the new
TFormatType
targetFormat
.true
if from
could be converted to the
requested TFormatType
targetFormat
; otherwise false
.