Skip to content

Commit 4ac6f90

Browse files
authored
Merge pull request iluwatar#748 from pelmegov/clean-converter-class
Parameters in Converter class methods was renamed.
2 parents 998600f + a8d89ca commit 4ac6f90

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

converter/src/main/java/com/iluwatar/converter/Converter.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,37 @@ public Converter(final Function<T, U> fromDto, final Function<U, T> fromEntity)
5050
}
5151

5252
/**
53-
* @param userDto DTO entity
53+
* @param dto DTO entity
5454
* @return The domain representation - the result of the converting function application on dto entity.
5555
*/
56-
public final U convertFromDto(final T userDto) {
57-
return fromDto.apply(userDto);
56+
public final U convertFromDto(final T dto) {
57+
return fromDto.apply(dto);
5858
}
5959

6060
/**
61-
* @param user domain entity
61+
* @param entity domain entity
6262
* @return The DTO representation - the result of the converting function application on domain entity.
6363
*/
64-
public final T convertFromEntity(final U user) {
65-
return fromEntity.apply(user);
64+
public final T convertFromEntity(final U entity) {
65+
return fromEntity.apply(entity);
6666
}
6767

6868
/**
69-
* @param dtoUsers collection of DTO entities
69+
* @param dtos collection of DTO entities
7070
* @return List of domain representation of provided entities retrieved by
7171
* mapping each of them with the conversion function
7272
*/
73-
public final List<U> createFromDtos(final Collection<T> dtoUsers) {
74-
return dtoUsers.stream().map(this::convertFromDto).collect(Collectors.toList());
73+
public final List<U> createFromDtos(final Collection<T> dtos) {
74+
return dtos.stream().map(this::convertFromDto).collect(Collectors.toList());
7575
}
7676

7777
/**
78-
* @param users collection of domain entities
78+
* @param entities collection of domain entities
7979
* @return List of domain representation of provided entities retrieved by
8080
* mapping each of them with the conversion function
8181
*/
82-
public final List<T> createFromEntities(final Collection<U> users) {
83-
return users.stream().map(this::convertFromEntity).collect(Collectors.toList());
82+
public final List<T> createFromEntities(final Collection<U> entities) {
83+
return entities.stream().map(this::convertFromEntity).collect(Collectors.toList());
8484
}
8585

8686
}

0 commit comments

Comments
 (0)