@@ -158,7 +158,7 @@ void skipPastEndQuote() {
158
158
}
159
159
160
160
@ Override
161
- final int parseNumber () {
161
+ int parseNumber () {
162
162
for (int i = head , len = 0 ; ; i ++) {
163
163
if (i == tail ) {
164
164
head = tail ;
@@ -206,7 +206,7 @@ private char[] handleEscapes(final int from, final int len) {
206
206
}
207
207
208
208
@ Override
209
- final <R > R parse (final CharBufferFunction <R > applyChars ) {
209
+ <R > R parse (final CharBufferFunction <R > applyChars ) {
210
210
final int from = head ;
211
211
final int len = parse (from );
212
212
if (numEscapes > 0 ) {
@@ -218,7 +218,7 @@ final <R> R parse(final CharBufferFunction<R> applyChars) {
218
218
}
219
219
220
220
@ Override
221
- final <C , R > R parse (final C context , final ContextCharBufferFunction <C , R > applyChars ) {
221
+ <C , R > R parse (final C context , final ContextCharBufferFunction <C , R > applyChars ) {
222
222
final int from = head ;
223
223
final int len = parse (from );
224
224
if (numEscapes > 0 ) {
@@ -278,7 +278,7 @@ <C> long parse(final C context, final ContextCharBufferToLongFunction<C> applyCh
278
278
}
279
279
280
280
@ Override
281
- final boolean parse (final CharBufferPredicate testChars ) {
281
+ boolean parse (final CharBufferPredicate testChars ) {
282
282
final int from = head ;
283
283
final int len = parse (from );
284
284
if (numEscapes > 0 ) {
@@ -290,7 +290,7 @@ final boolean parse(final CharBufferPredicate testChars) {
290
290
}
291
291
292
292
@ Override
293
- final <C > boolean parse (final C context , final ContextCharBufferPredicate <C > testChars ) {
293
+ <C > boolean parse (final C context , final ContextCharBufferPredicate <C > testChars ) {
294
294
final int from = head ;
295
295
final int len = parse (from );
296
296
if (numEscapes > 0 ) {
@@ -302,7 +302,7 @@ final <C> boolean parse(final C context, final ContextCharBufferPredicate<C> tes
302
302
}
303
303
304
304
@ Override
305
- final void parse (final CharBufferConsumer testChars ) {
305
+ void parse (final CharBufferConsumer testChars ) {
306
306
final int from = head ;
307
307
final int len = parse (from );
308
308
if (numEscapes > 0 ) {
@@ -314,7 +314,7 @@ final void parse(final CharBufferConsumer testChars) {
314
314
}
315
315
316
316
@ Override
317
- final <C > void parse (final C context , final ContextCharBufferConsumer <C > testChars ) {
317
+ <C > void parse (final C context , final ContextCharBufferConsumer <C > testChars ) {
318
318
final int from = head ;
319
319
final int len = parse (from );
320
320
if (numEscapes > 0 ) {
@@ -326,12 +326,12 @@ final <C> void parse(final C context, final ContextCharBufferConsumer<C> testCha
326
326
}
327
327
328
328
@ Override
329
- final boolean fieldEquals (final String field , final int offset , final int len ) {
329
+ boolean fieldEquals (final String field , final int offset , final int len ) {
330
330
return JsonIterator .fieldEquals (field , buf , offset , len );
331
331
}
332
332
333
333
@ Override
334
- final boolean breakOut (final FieldBufferPredicate fieldBufferFunction , final int offset , final int len ) {
334
+ boolean breakOut (final FieldBufferPredicate fieldBufferFunction , final int offset , final int len ) {
335
335
if (numEscapes > 0 ) {
336
336
final char [] chars = handleEscapes (offset , len );
337
337
return !fieldBufferFunction .test (chars , 0 , chars .length , this );
@@ -341,7 +341,7 @@ final boolean breakOut(final FieldBufferPredicate fieldBufferFunction, final int
341
341
}
342
342
343
343
@ Override
344
- final <C > boolean breakOut (final C context , final ContextFieldBufferPredicate <C > fieldBufferFunction , final int offset , final int len ) {
344
+ <C > boolean breakOut (final C context , final ContextFieldBufferPredicate <C > fieldBufferFunction , final int offset , final int len ) {
345
345
if (numEscapes > 0 ) {
346
346
final char [] chars = handleEscapes (offset , len );
347
347
return !fieldBufferFunction .test (context , chars , 0 , chars .length , this );
@@ -361,7 +361,7 @@ <C> long test(final C context, final long mask, final ContextFieldBufferMaskedPr
361
361
}
362
362
363
363
@ Override
364
- final <R > R apply (final FieldBufferFunction <R > fieldBufferFunction , final int offset , final int len ) {
364
+ <R > R apply (final FieldBufferFunction <R > fieldBufferFunction , final int offset , final int len ) {
365
365
if (numEscapes > 0 ) {
366
366
final char [] chars = handleEscapes (offset , len );
367
367
return fieldBufferFunction .apply (chars , 0 , chars .length , this );
@@ -371,7 +371,7 @@ final <R> R apply(final FieldBufferFunction<R> fieldBufferFunction, final int of
371
371
}
372
372
373
373
@ Override
374
- final <C , R > R apply (final C context , final ContextFieldBufferFunction <C , R > fieldBufferFunction , final int offset , final int len ) {
374
+ <C , R > R apply (final C context , final ContextFieldBufferFunction <C , R > fieldBufferFunction , final int offset , final int len ) {
375
375
if (numEscapes > 0 ) {
376
376
final char [] chars = handleEscapes (offset , len );
377
377
return fieldBufferFunction .apply (context , chars , 0 , chars .length , this );
@@ -381,45 +381,45 @@ final <C, R> R apply(final C context, final ContextFieldBufferFunction<C, R> fie
381
381
}
382
382
383
383
@ Override
384
- final BigDecimal parseBigDecimal (final CharBufferFunction <BigDecimal > parseChars ) {
384
+ BigDecimal parseBigDecimal (final CharBufferFunction <BigDecimal > parseChars ) {
385
385
final int len = parseNumber ();
386
386
return parseChars .apply (buf , head - len , len );
387
387
}
388
388
389
389
@ Override
390
- final String parsedNumberAsString (final int len ) {
390
+ String parsedNumberAsString (final int len ) {
391
391
return new String (buf , head - len , len );
392
392
}
393
393
394
394
@ Override
395
- final <R > R parseNumber (final CharBufferFunction <R > applyChars , final int len ) {
396
- return applyChars .apply (buf , 0 , len );
395
+ <R > R parseNumber (final CharBufferFunction <R > applyChars , final int len ) {
396
+ return applyChars .apply (buf , head - len , len );
397
397
}
398
398
399
399
@ Override
400
- final <C , R > R parseNumber (final C context ,
401
- final ContextCharBufferFunction <C , R > applyChars ,
402
- final int len ) {
403
- return applyChars .apply (context , buf , 0 , len );
400
+ <C , R > R parseNumber (final C context ,
401
+ final ContextCharBufferFunction <C , R > applyChars ,
402
+ final int len ) {
403
+ return applyChars .apply (context , buf , head - len , len );
404
404
}
405
405
406
406
@ Override
407
407
int parseNumber (final CharBufferToIntFunction applyChars , final int len ) {
408
- return applyChars .applyAsInt (buf , 0 , len );
408
+ return applyChars .applyAsInt (buf , head - len , len );
409
409
}
410
410
411
411
@ Override
412
412
<C > int parseNumber (final C context , final ContextCharBufferToIntFunction <C > applyChars , final int len ) {
413
- return applyChars .applyAsInt (context , buf , 0 , len );
413
+ return applyChars .applyAsInt (context , buf , head - len , len );
414
414
}
415
415
416
416
@ Override
417
417
long parseNumber (final CharBufferToLongFunction applyChars , final int len ) {
418
- return applyChars .applyAsLong (buf , 0 , len );
418
+ return applyChars .applyAsLong (buf , head - len , len );
419
419
}
420
420
421
421
@ Override
422
422
<C > long parseNumber (final C context , final ContextCharBufferToLongFunction <C > applyChars , final int len ) {
423
- return applyChars .applyAsLong (context , buf , 0 , len );
423
+ return applyChars .applyAsLong (context , buf , head - len , len );
424
424
}
425
425
}
0 commit comments