Returns true if unprocessed tokens remain. @return true if unprocessed tokens remain.
()
| 206 | * @return {@code true} if unprocessed tokens remain. |
| 207 | */ |
| 208 | public boolean hasMoreTokens() { |
| 209 | if (delimiters == null) { |
| 210 | throw new NullPointerException(); |
| 211 | } |
| 212 | int length = string.length(); |
| 213 | if (position < length) { |
| 214 | if (returnDelimiters) |
| 215 | return true; // there is at least one character and even if |
| 216 | // it is a delimiter it is a token |
| 217 | |
| 218 | // otherwise find a character which is not a delimiter |
| 219 | for (int i = position; i < length; i++) |
| 220 | if (delimiters.indexOf(string.charAt(i), 0) == -1) |
| 221 | return true; |
| 222 | } |
| 223 | return false; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Returns the next token in the string as an {@code Object}. This method is |
no test coverage detected