MCPcopy Create free account
hub / github.com/davidgiven/luje / hasMoreTokens

Method hasMoreTokens

lib/java/util/StringTokenizer.java:208–224  ·  view source on GitHub ↗

Returns true if unprocessed tokens remain. @return true if unprocessed tokens remain.

()

Source from the content-addressed store, hash-verified

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

Callers 2

isValidDomainNameMethod · 0.95
hasMoreElementsMethod · 0.95

Calls 3

lengthMethod · 0.65
indexOfMethod · 0.65
charAtMethod · 0.65

Tested by

no test coverage detected