Libraryless. Click here for Pure Java version (39L/1K).
static <B, A extends B> A addAndReturn(Collection<B> c, A a) { if (c != null) c.add(a); ret a; } static <B, A extends B> A addAndReturn(L<B> c, int idx, A a) { if (c != null) c.add(idx, a); ret a; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007299 |
Snippet name: | addAndReturn - add element to a collection and return the element |
Eternal ID of this version: | #1007299/2 |
Text MD5: | 8d65f5aa8598c63a93e31fba0e204592 |
Transpilation MD5: | ff6591912d2d87b9f79d44b56a4ebdb9 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-06-27 04:34:17 |
Source code size: | 215 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 563 / 673 |
Version history: | 1 change(s) |
Referenced in: | [show references] |