daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void method(Map<?, Model> map){
  2.  
  3.     Map<UUID, Model> transformation = map.entrySet()
  4. .stream()
  5. .collect(Collectors.toMap(
  6.    entry -> entry.getKey().getId(),
  7.     entry-> entry.getValue()
  8.     ));
  9. }
  10.  
  11.  
  12.     class S{
  13.      protected UUID getId(){
  14.      // return UUID
  15.      }
  16.     }
  17.  
  18.     class A extends S{
  19.     }
  20.     class B extends S{
  21.     }
  22.     class Model{
  23.     // bla bla
  24.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top