Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void method(Map<?, Model> map){
- Map<UUID, Model> transformation = map.entrySet()
- .stream()
- .collect(Collectors.toMap(
- entry -> entry.getKey().getId(),
- entry-> entry.getValue()
- ));
- }
- class S{
- protected UUID getId(){
- // return UUID
- }
- }
- class A extends S{
- }
- class B extends S{
- }
- class Model{
- // bla bla
- }
Add Comment
Please, Sign In to add comment