This commit is contained in:
adam.kaczmmarek@gmail.com 2017-10-28 22:27:34 +02:00
commit a2a13758e0
2 changed files with 2 additions and 5 deletions

View File

@ -41,10 +41,7 @@ public class App {
* @param args command line args
*/
public static void main(String[] args) {
Converter<UserDto, User> userConverter = new Converter<>(
userDto -> new User(userDto.getFirstName(), userDto.getLastName(), userDto.isActive(),
userDto.getEmail()),
user -> new UserDto(user.getFirstName(), user.getLastName(), user.isActive(), user.getUserId()));
Converter<UserDto, User> userConverter = new UserConverter();
UserDto dtoUser = new UserDto("John", "Doe", true, "whatever[at]wherever.com");
User user = userConverter.convertFromDto(dtoUser);

View File

@ -35,7 +35,7 @@ Wikipedia says
**Programmatic Example**
Lets take the troll example. First of all we have a simple troll implementing the troll interface
Let's take the troll example. First of all we have a simple troll implementing the troll interface
```
public interface Troll {