Libraryless. Click here for Pure Java version (7885L/44K).
1 | static LinkedHashSet mapToLinkedHashSet(O f, Cl l) {
|
2 | LinkedHashSet x = new(l(l)); |
3 | if (l != null) for (O o : l) |
4 | x.add(callF(f, o)); |
5 | ret x; |
6 | } |
7 | static LinkedHashSet mapToLinkedHashSet(O f, Iterable l) {
|
8 | new LinkedHashSet x; |
9 | if (l != null) for (O o : l) |
10 | x.add(callF(f, o)); |
11 | ret x; |
12 | } |
13 | |
14 | static <A, B> LinkedHashSet<B> lambdaMapLike mapToLinkedHashSet(IF1<A, B> f, Iterable<A> l) {
|
15 | ret mapToLinkedHashSet((O) f, l); |
16 | } |
Began life as a copy of #1011181
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031609 |
| Snippet name: | mapToLinkedHashSet - map function, return as LinkedHashSet |
| Eternal ID of this version: | #1031609/4 |
| Text MD5: | 27816050f8be692e0211be1f32d70354 |
| Transpilation MD5: | 7dc9232a7542aae3d0c97c8637d03a65 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-05-06 15:40:14 |
| Source code size: | 445 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 406 / 526 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |