(int index)
| 38 | private int index = -1; |
| 39 | |
| 40 | void setIndex(int index) { |
| 41 | if (this.index != -1) { |
| 42 | throw new IllegalStateException("index already set"); |
| 43 | } |
| 44 | if (index < 0) { |
| 45 | throw new IllegalArgumentException( |
| 46 | "index must be 0 or positive number, given: " + index); |
| 47 | } |
| 48 | this.index = index; |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public int getIndex() { |
nothing calls this directly
no outgoing calls
no test coverage detected