コード例 #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;
 }
コード例 #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);
   }
 }