Interface GenericTranslator<R extends GenericIntegrationResponse, D extends GenericIntegrationDTO>

Type Parameters:
R - child of GenericIntegrationResponse
D - child of GenericIntegrationDTO
All Known Implementing Classes:
ForexFactoryMarketEventResponseTranslator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GenericTranslator<R extends GenericIntegrationResponse, D extends GenericIntegrationDTO>
General translator that translates a GenericIntegrationResponse into a GenericIntegrationDTO.
Version:
1.0.5
Author:
Stephen Prizio
  • Method Summary

    Modifier and Type
    Method
    Description
    translate(R response)
    Converts an R into a D.
    default List<D>
    Converts a List of R into a List of D.
  • Method Details

    • translate

      D translate(R response)
      Converts an R into a D.
      Parameters:
      response - R
      Returns:
      D
    • translateAll

      default List<D> translateAll(Collection<R> responses)
      Converts a List of R into a List of D.
      Parameters:
      responses - List of R
      Returns:
      List of D