Interface ModelConverter<S,​T>

  • Type Parameters:
    S - the source type
    T - the target type
    All Known Implementing Classes:
    AbstractModelConverter, ValidationErrorResourceAssembler

    public interface ModelConverter<S,​T>
    Converter interface for converting between two types.
    Since:
    2.0.0
    Author:
    Wouter Eerdekens, Marcel Overdijk, Rutger Lubbers, Paul Klos
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<T> convert​(Iterable<? extends S> objects)
      Converts all given source objects into target objects.
      T convert​(S source)
      Converts the given source object into a new instance of target object.
      void convert​(S source, T target)
      Converts the given source object into the target object.
    • Method Detail

      • convert

        T convert​(S source)
        Converts the given source object into a new instance of target object.
        Parameters:
        source - the source object
        Returns:
        the target object
      • convert

        void convert​(S source,
                     T target)
        Converts the given source object into the target object.
        Parameters:
        source - the source object
        target - the target object
      • convert

        List<T> convert​(Iterable<? extends S> objects)
        Converts all given source objects into target objects.
        Parameters:
        objects - the object, must not be null.
        Returns:
        the target objects