Esempio n. 1
0
 public int nextInt() {
   if (!hasNext()) throw new NoSuchElementException();
   // TODO: It probably would be faster if the logic from
   // the following two methods were inlined and simplified.
   int cp = Character.codePointAt(CharSequence.this, cur);
   cur += Character.charCount(cp);
   return cp;
 }
Esempio n. 2
0
 @Override
 public void forEachInt(IntConsumer block) {
   while (cur < length()) {
     int cp = Character.codePointAt(CharSequence.this, cur);
     cur += Character.charCount(cp);
     block.accept(cp);
   }
 }