1 | static <B, A extends B> A addAndPrint(Collection<B> c, A a) { |
2 | print(a); |
3 | if (c != null) c.add(a); |
4 | ret a; |
5 | } |
Began life as a copy of #1007299
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023695 |
Snippet name: | addAndPrint - add element to a collection, print the element and return it |
Eternal ID of this version: | #1023695/1 |
Text MD5: | 54f5fb39e32f8d3489aa3bbcef2cbdb7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-03 13:16:35 |
Source code size: | 115 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 312 / 335 |
Referenced in: | [show references] |