1 | static <A, B extends A> void addAllNonNulls(Collection<A> c, Iterable<B> b) { |
2 | if (c != null && b != null) for (A a : b) if (a != null) c.add(a); |
3 | } |
4 | |
5 | static <A, B extends A> void addAllNonNulls(Collection<A> c, B... b) { |
6 | if (c != null && b != null) for (A a : b) if (a != null) c.add(a); |
7 | } |
Began life as a copy of #1004686
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021319 |
Snippet name: | addAllNonNulls |
Eternal ID of this version: | #1021319/1 |
Text MD5: | 477649b46a0d738e703253e0c5018743 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-08 16:32:55 |
Source code size: | 297 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 359 / 400 |
Referenced in: | [show references] |