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

3
LINES

< > BotCompany Repo | #1023062 // singletonMapToPair - or null if not a singleton

JavaX fragment (include)

static <A, B> Pair<A, B> singletonMapToPair(Map<A, B> map) {
  ret l(map) != 1 ? null : firstKeyAndValue(map);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023062
Snippet name: singletonMapToPair - or null if not a singleton
Eternal ID of this version: #1023062/1
Text MD5: aa759d7c0e23b475c1a4d2b9c3f96fcd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-30 17:34:45
Source code size: 114 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 249 / 292
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)