Interface ContextAwareConverter<S,T,C>

Type Parameters:
S - - the type of the source object
T - - the type of the destination object
C - - the type of the context object
All Known Implementing Classes:
DefaultAsContextAwareConverter

public interface ContextAwareConverter<S,T,C>
Interface for a converter that transforms an object of one type into an object of another type.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(S source, C context)
    Converts the source object, creating a new instance of the destination type.
    default List<T>
    convertAll(Collection<? extends S> sources, C context)
    Convert Collection of SOURCE instances and return Collection of TARGET instances.
  • Method Details

    • convert

      T convert(S source, C context)
      Converts the source object, creating a new instance of the destination type.
      Parameters:
      source - the source object
      Returns:
      the converted object
    • convertAll

      default List<T> convertAll(Collection<? extends S> sources, C context)
      Convert Collection of SOURCE instances and return Collection of TARGET instances.
      Parameters:
      sources - the source instances
      Returns:
      collection of target instances