1 | static <A> A firstNotNull(Iterable<A> c) { |
2 | Iterator<A> it = c.iterator(); |
3 | while (it.hasNext()) { |
4 | A a = it.next(); |
5 | if (a != null) ret a; |
6 | } |
7 | null; |
8 | } |
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: | #1012762 |
Snippet name: | firstNotNull |
Eternal ID of this version: | #1012762/4 |
Text MD5: | e2b875455c3716c2175644aacc99df1a |
Author: | stefan |
Category: | javax / collections |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-13 01:46:00 |
Source code size: | 168 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 518 / 541 |
Version history: | 3 change(s) |
Referenced in: | [show references] |