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

9
LINES

< > BotCompany Repo | #1017778 - addAllAndReturnCollection

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

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

1  
static <A, B extends Collection<A>> B addAllAndReturnCollection(B c, Collection<A> b) {
2  
  if (c != null && b != null) c.addAll(b);
3  
  ret c;
4  
}
5  
6  
static <A, B extends Collection<A>> B addAllAndReturnCollection(B c, A... b) {
7  
  addAll(c, b);
8  
  ret c;
9  
}

Author comment

Began life as a copy of #1015243

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017778
Snippet name: addAllAndReturnCollection
Eternal ID of this version: #1017778/4
Text MD5: b200a4c2d3bf0c9380e55cc340cafb70
Transpilation MD5: 0470f41653a2945bb947ac346aa23475
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-14 02:07:31
Source code size: 258 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 222 / 266
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1017778 & http://1017778.tinybrain.de