1 | static <A> A firstOfType(Collection c, Class<A> type) {
|
2 | for (O x : c) |
3 | if (isInstanceX(type, x)) |
4 | ret (A) x; |
5 | ret null; |
6 | } |
Began life as a copy of #1004806
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004821 |
| Snippet name: | firstOfType - return first element of collection that is of some type |
| Eternal ID of this version: | #1004821/1 |
| Text MD5: | eacaaf1f1c3dbb45939e0ef16e13c602 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-09-02 14:19:32 |
| Source code size: | 137 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 853 / 879 |
| Referenced in: | [show references] |