()
| 76 | } |
| 77 | |
| 78 | public String nextToken() { |
| 79 | for (int i = position; i < in.length(); ++i) { |
| 80 | if (isDelimiter(in.charAt(i))) { |
| 81 | if (includeDelimiters) { |
| 82 | return in.substring(i, i + 1); |
| 83 | } |
| 84 | } else { |
| 85 | position = i; |
| 86 | while (position < in.length() && ! isDelimiter(in.charAt(position))) { |
| 87 | ++ position; |
| 88 | } |
| 89 | return in.substring(i, position); |
| 90 | } |
| 91 | } |
| 92 | throw new NoSuchElementException(); |
| 93 | } |
| 94 | |
| 95 | public String nextToken(String delimiters) { |
| 96 | this.delimiters = delimiters; |
no test coverage detected