Warning: session_start(): open(/var/lib/php/sessions/sess_0b5nf1aphbf1rkeld0bul7cnvv, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
keyForValue_sync [1025628]

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

10
LINES

< > BotCompany Repo | #1025628 // keyForValue_sync

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

Libraryless. Click here for Pure Java version (74L/1K).

1  
static <A, B> A keyForValue_sync(B value, Map<A, B> map) {
2  
  ret keyForValue_sync(map, value);
3  
}
4  
5  
static <A, B> A keyForValue_sync(Map<A, B> map, B value) {
6  
  if (map == null || value == null) null;
7  
  synchronized(map) {
8  
    ret keyForValue(map, value);
9  
  }
10  
}

Author comment

Began life as a copy of #1002303

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: #1025628
Snippet name: keyForValue_sync
Eternal ID of this version: #1025628/1
Text MD5: e2ce96bbddae3a71ecc72b820a23c4c6
Transpilation MD5: 4ab267619d6375a7ea35ab01641ce3cd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-10 00:53:56
Source code size: 268 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 612 / 801
Referenced in: [show references]