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

3
LINES

< > BotCompany Repo | #1012217 // addPair - add pair to collection if collection != null

JavaX fragment (include)

static <A, B> void addPair(Collection<Pair<A, B>> c, A a, B b) {
  if (c != null) c.add(pair(a, b));
}

Author comment

Began life as a copy of #1012157

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1012217
Snippet name: addPair - add pair to collection if collection != null
Eternal ID of this version: #1012217/2
Text MD5: d4d2bd25949426414db8cc5d53a57281
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-24 11:29:14
Source code size: 104 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 581 / 597
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1021294 - addPairIfBAtLeast - add pair to collection if collection != null and b >= threshold