- Type Parameters:
DataType- the type of the object to be transformed (and also the type of the resulting object)
public interface DataTransformer<DataType>
Defines a transformation of objects. The transformation does not need to be
reversible.
Note that in case this transformation is slow (e.g.: waits for external
events, like reading a file), consider using AsyncDataTransformer or
simply an AsyncDataQuery for transformation.
Thread safety
Implementations of this interface are required to be safe to be used by multiple threads concurrently.Synchronization transparency
Implementations of this interface are not required to be synchronization transparent.- See Also:
-
Method Summary
-
Method Details
-
transform
Transforms the data as defined by the implementation. Note that the transformation might not be reversible.- Parameters:
data- the object to be transformed. This argument can benullif the transformation supports convertingnullvalues.- Returns:
- the transformed data as defined by the implementation. This
method may or may not returns
null, depending on the implementation.
-