Returns the ith item of this IntList.
(int i)
| 11 | |
| 12 | /** Returns the ith item of this IntList. */ |
| 13 | public int get(int i) { |
| 14 | if (i == 0) { |
| 15 | return first; |
| 16 | } |
| 17 | return rest.get(i - 1); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Method to create an IntList from an argument list. |