MCPcopy Create free account
hub / github.com/careercup/ctci / nextToken

Method nextToken

java/Chapter 17/Question17_10/QuestionString.java:79–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 }
78
79 private String nextToken() throws IOException {
80 if (currentTokenIndex >= tokens.size()) {
81 throw new IOException("Unexpected end of input.");
82 }
83
84 String token = tokens.get(currentTokenIndex);
85 currentTokenIndex++;
86 return token;
87 }
88
89 private void nextToken(String expectedToken) throws IOException {
90 if (currentTokenIndex >= tokens.size()) {

Callers 1

encodeTokensMethod · 0.95

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected