Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class Item {
  2. private final String id;
  3.  
  4. public Item(String id) {
  5. this.id = id;
  6. }
  7.  
  8. public String getId() {
  9. return id;
  10. }
  11. }
  12.  
  13. //simplified example: the main use case of the library is to map different types to another
  14. Mapper<Item, Item> mapper = new ConstructorBuilder1<Item, String, Item>(Item::new)
  15. .from(Item::getId).mapTo(Function.identity())
  16. .build();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement