Interface Transform

All Known Implementing Classes:
Transforms.BooleanToBoolean, Transforms.ConsStringToFile, Transforms.ConsStringToString, Transforms.DoubleToBigDecimal, Transforms.DoubleToDouble, Transforms.DoubleToFloatingPointTolerance, Transforms.DoubleToInt, Transforms.DoubleToLong, Transforms.IntegerToDouble, Transforms.IntegerToInt, Transforms.IntegerToLong, Transforms.ObjectToJoinKey, Transforms.ObjectToSortKey, Transforms.StringToEnum, Transforms.StringToFile, Transforms.TextRecordToRecordTokenType

public interface Transform
Provides a transformation from a source data type to a target data type.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    supports(Class<?> sourceType, Class<?> targetClass)
    Determines if this transformer supports the given types.
    transform(Object source, Class<?> targetType)
    Transform the given source object into the wanted target object.
  • Method Details

    • supports

      boolean supports(Class<?> sourceType, Class<?> targetClass)
      Determines if this transformer supports the given types.
      Parameters:
      sourceType - type of the data source
      targetClass - type of the data target
      Returns:
      true if supported; false otherwise
    • transform

      Object transform(Object source, Class<?> targetType)
      Transform the given source object into the wanted target object.
      Parameters:
      source - object to transform
      targetType - type of the target object
      Returns:
      result of the transformation