1 | static O[] paramsWithout(O[] a1, O... keys) {
|
2 | if (l(a1) == 1 && a1[0] instanceof Map) |
3 | ret new O[] { mapMinus((Map) a1[0], keys) };
|
4 | |
5 | Set set = lithashset(keys); |
6 | new L l; |
7 | int n = l(a1); |
8 | for (int i = 0; i < n; i += 2) |
9 | if (i == n-1) l.add(a1[i]); |
10 | else if (!set.contains(a1[i])) {
|
11 | l.add(a1[i]); |
12 | l.add(a1[i+1]); |
13 | } |
14 | ret toObjectArray(l); |
15 | } |
Began life as a copy of #1011578
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1020112 |
| Snippet name: | paramsWithout - drop key from param array |
| Eternal ID of this version: | #1020112/7 |
| Text MD5: | 348ddd1ef2b8e32fca61e68466661750 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-11 19:06:54 |
| Source code size: | 389 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 650 / 697 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |