1 | sclass PairComparedByA<A, B> extends Pair<A, B> { |
2 | *() {} |
3 | *(A *a, B *b) {} |
4 | |
5 | public bool equals(O o) { |
6 | ret o instanceof Pair && eq(a, o/Pair.a); |
7 | } |
8 | |
9 | public int compareTo(Pair<A, B> p) { |
10 | ret stdcmp(a, p.a); |
11 | } |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016560 |
Snippet name: | PairComparedByA |
Eternal ID of this version: | #1016560/7 |
Text MD5: | 693f4c283f2067f2480f66ed9b6720de |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-23 17:10:54 |
Source code size: | 241 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 397 / 1187 |
Version history: | 6 change(s) |
Referenced in: | [show references] |