Interface ModelConverter<S,T>

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

public interface ModelConverter<S,T>
Converter interface for converting between two types.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(Iterable<? extends S> objects)
    Converts all given source objects into target objects.
    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 Details

    • 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