1 | sclass SameTypePair<A> extends Pair<A> {
|
2 | A get(int i) {
|
3 | if (i == 0) ret a; |
4 | if (i == 1) ret b; |
5 | fail("Index out of range", i);
|
6 | } |
7 | } |
Began life as a copy of #1004219
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1036521 |
| Snippet name: | SameTypePair - Pair where both types are identical. Not sure if we should use this. Use pairGet instead |
| Eternal ID of this version: | #1036521/5 |
| Text MD5: | 57f7472992def7ef4e4278d66fbebe59 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-01-22 12:14:13 |
| Source code size: | 150 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 392 / 403 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |