1 | static <A> L<A> filterByType(Iterable c, Class<A> type) {
|
2 | new L<A> l; |
3 | if (c != null) for (O x : c) |
4 | if (isInstanceX(type, x)) |
5 | l.add((A) x); |
6 | ret l; |
7 | } |
8 | |
9 | static <A> L<A> filterByType(O[] c, Class<A> type) {
|
10 | ret filterByType(asList(c), type); |
11 | } |
12 | |
13 | static <A> L<A> filterByType(Class<A> type, Iterable c) {
|
14 | ret filterByType(c, type); |
15 | } |
Began life as a copy of #1002319
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004806 |
| Snippet name: | filterByType - only return instances of some class from collection |
| Eternal ID of this version: | #1004806/4 |
| Text MD5: | d95ef555486b5c2e41ffbbcd4bb4a4f8 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-06 18:24:03 |
| Source code size: | 360 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 967 / 984 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |