Merge branch 'master' of https://github.com/iluwatar/java-design-patterns
This commit is contained in:
commit
a2a13758e0
@ -41,10 +41,7 @@ public class App {
|
|||||||
* @param args command line args
|
* @param args command line args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Converter<UserDto, User> userConverter = new Converter<>(
|
Converter<UserDto, User> userConverter = new UserConverter();
|
||||||
userDto -> new User(userDto.getFirstName(), userDto.getLastName(), userDto.isActive(),
|
|
||||||
userDto.getEmail()),
|
|
||||||
user -> new UserDto(user.getFirstName(), user.getLastName(), user.isActive(), user.getUserId()));
|
|
||||||
|
|
||||||
UserDto dtoUser = new UserDto("John", "Doe", true, "whatever[at]wherever.com");
|
UserDto dtoUser = new UserDto("John", "Doe", true, "whatever[at]wherever.com");
|
||||||
User user = userConverter.convertFromDto(dtoUser);
|
User user = userConverter.convertFromDto(dtoUser);
|
||||||
|
@ -35,7 +35,7 @@ Wikipedia says
|
|||||||
|
|
||||||
**Programmatic Example**
|
**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 {
|
public interface Troll {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user