Libraryless. Click here for Pure Java version (39L/1K).
1 | static <B, A extends B> A addAndReturn(Collection<B> c, A a) {
|
2 | if (c != null) c.add(a); |
3 | ret a; |
4 | } |
5 | |
6 | static <B, A extends B> A addAndReturn(L<B> c, int idx, A a) {
|
7 | if (c != null) c.add(idx, a); |
8 | ret a; |
9 | } |
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: | 1207 / 1448 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |