Libraryless. Click here for Pure Java version (3358L/21K).
1 | static IntPairTreeSet intPairTreeSetWithComparator(Comparator<IntPair> comparator) {
|
2 | ret new IntPairTreeSet {
|
3 | @Override public int compare(long a, long b) {
|
4 | ret comparator.compare(longToIntPair(a), longToIntPair(b)); |
5 | } |
6 | }; |
7 | } |
8 | |
9 | ifclass LongComparator |
10 | static IntPairTreeSet intPairTreeSetWithComparator(LongComparator comparator) {
|
11 | ret new IntPairTreeSet {
|
12 | @Override public int compare(long a, long b) {
|
13 | ret comparator.compare(a, b); |
14 | } |
15 | }; |
16 | } |
17 | endif |
Began life as a copy of #1030408
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030410 |
| Snippet name: | intPairTreeSetWithComparator |
| Eternal ID of this version: | #1030410/3 |
| Text MD5: | e531c6263f98e702f7c2b1f72c9232aa |
| Transpilation MD5: | 093c37e5d66529e4d60f71ab4da6ad2e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-13 17:32:37 |
| Source code size: | 494 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 395 / 532 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |