MCPcopy Index your code
hub / github.com/processing/processing / next

Method next

core/src/processing/data/JSONTokener.java:148–177  ·  view source on GitHub ↗

Get the next character in the source string. @return The next character, or 0 if past the end of the source string.

()

Source from the content-addressed store, hash-verified

146 * @return The next character, or 0 if past the end of the source string.
147 */
148 public char next() {
149 int c;
150 if (this.usePrevious) {
151 this.usePrevious = false;
152 c = this.previous;
153 } else {
154 try {
155 c = this.reader.read();
156 } catch (IOException exception) {
157 throw new RuntimeException(exception);
158 }
159
160 if (c <= 0) { // End of stream
161 this.eof = true;
162 c = 0;
163 }
164 }
165 this.index += 1;
166 if (this.previous == '\r') {
167 this.line += 1;
168 this.character = c == '\n' ? 0 : 1;
169 } else if (c == '\n') {
170 this.line += 1;
171 this.character = 0;
172 } else {
173 this.character += 1;
174 }
175 this.previous = (char) c;
176 return this.previous;
177 }
178
179
180 /**

Callers 6

moreMethod · 0.95
nextCleanMethod · 0.95
nextStringMethod · 0.95
nextToMethod · 0.95
nextValueMethod · 0.95
skipToMethod · 0.95

Calls 2

endMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected