Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

4
LINES

< > BotCompany Repo | #1029720 // replaceValue

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2499L/16K).

1  
static <A, B> void transformValue(Map<A, B> map, A key, IF1<B> f) {
2  
  if (map == null || !map.containsKey(key)) ret;
3  
  map.put(key, f.get(map.get(key)));
4  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029720
Snippet name: replaceValue
Eternal ID of this version: #1029720/2
Text MD5: ea5def75068a924484b733f9039348ed
Transpilation MD5: 548d1f1617e69f435170836ca7876cdc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-09 12:54:45
Source code size: 158 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 187 / 277
Version history: 1 change(s)
Referenced in: [show references]