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

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

      • 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 java.util.List<T> convertAll​(java.util.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