1 | static <A> int tripleIndexOf(T3<A> t, A a) { |
2 | if (t == null) ret -1; |
3 | if (eq(t.a, a)) ret 0; |
4 | if (eq(t.b, a)) ret 1; |
5 | if (eq(t.c, a)) ret 2; |
6 | ret -1; |
7 | } |
8 | |
9 | static <A> int tripleIndexOf(A a, A b, A c, A x) { |
10 | if (eq(a, x)) ret 0; |
11 | if (eq(b, x)) ret 1; |
12 | if (eq(c, x)) ret 2; |
13 | ret -1; |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012656 |
Snippet name: | tripleIndexOf |
Eternal ID of this version: | #1012656/4 |
Text MD5: | 57a9d20837270f67654bbc687754721d |
Author: | stefan |
Category: | javax / structures |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-10 00:39:03 |
Source code size: | 302 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 484 / 497 |
Version history: | 3 change(s) |
Referenced in: | [show references] |