From a8d89ca861c51d6610b278ea1a0c778ff48d9f78 Mon Sep 17 00:00:00 2001 From: pelmegov Date: Sat, 28 Apr 2018 19:34:57 +0300 Subject: [PATCH] Parameters in Converter class methods was renamed. A base class must not contain the concrete entities names or concrete class names --- .../com/iluwatar/converter/Converter.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/converter/src/main/java/com/iluwatar/converter/Converter.java b/converter/src/main/java/com/iluwatar/converter/Converter.java index 918d2d503..4a2bb7381 100644 --- a/converter/src/main/java/com/iluwatar/converter/Converter.java +++ b/converter/src/main/java/com/iluwatar/converter/Converter.java @@ -50,37 +50,37 @@ public class Converter { } /** - * @param userDto DTO entity + * @param dto DTO entity * @return The domain representation - the result of the converting function application on dto entity. */ - public final U convertFromDto(final T userDto) { - return fromDto.apply(userDto); + public final U convertFromDto(final T dto) { + return fromDto.apply(dto); } /** - * @param user domain entity + * @param entity domain entity * @return The DTO representation - the result of the converting function application on domain entity. */ - public final T convertFromEntity(final U user) { - return fromEntity.apply(user); + public final T convertFromEntity(final U entity) { + return fromEntity.apply(entity); } /** - * @param dtoUsers collection of DTO entities + * @param dtos collection of DTO entities * @return List of domain representation of provided entities retrieved by * mapping each of them with the conversion function */ - public final List createFromDtos(final Collection dtoUsers) { - return dtoUsers.stream().map(this::convertFromDto).collect(Collectors.toList()); + public final List createFromDtos(final Collection dtos) { + return dtos.stream().map(this::convertFromDto).collect(Collectors.toList()); } /** - * @param users collection of domain entities + * @param entities collection of domain entities * @return List of domain representation of provided entities retrieved by * mapping each of them with the conversion function */ - public final List createFromEntities(final Collection users) { - return users.stream().map(this::convertFromEntity).collect(Collectors.toList()); + public final List createFromEntities(final Collection entities) { + return entities.stream().map(this::convertFromEntity).collect(Collectors.toList()); } }