Libraryless. Click here for Pure Java version (31L/1K).
1 | static <A> int addAndReturnIndex(L<A> l, A a) {
|
2 | if (l == null) ret -1; |
3 | int idx = l.size(); |
4 | l.add(a); |
5 | ret idx; |
6 | } |
Began life as a copy of #1017186
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028176 |
| Snippet name: | addAndReturnIndex - add to list and return index of new element |
| Eternal ID of this version: | #1028176/1 |
| Text MD5: | 6d31417799a3745e84c4a06ea0233882 |
| Transpilation MD5: | 852ddffe161fecf247dd94a4c5ba317e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-25 13:55:40 |
| Source code size: | 124 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 533 / 697 |
| Referenced in: | [show references] |