Libraryless. Click here for Pure Java version (10033L/55K).
sclass Pair<A, B> is Comparable<Pair<A, B>> { settable A a; settable B b; *() {} *(A *a, B *b) {} public int hashCode() { ret hashCodeFor(a) + 2*hashCodeFor(b); } public bool equals(O o) { if (o == this) true; if (!(o instanceof Pair)) false; Pair t = (Pair) o; ret eq(a, t.a) && eq(b, t.b); } toString { ret "<" + a + ", " + b + ">"; } public int compareTo(Pair<A, B> p) { if (p == null) ret 1; int i = ((Comparable<A>) a).compareTo(p.a); if (i != 0) ret i; ret ((Comparable<B>) b).compareTo(p.b); } }
Began life as a copy of #1004216
download show line numbers debug dex old transpilations
Travelled to 24 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, imzmzdywqqli, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv, xrpafgyirdlv
No comments. add comment