/** * Return a copy of this iterator which is limited to the given number of code points after the current one. Advancing * the returned iterator will also advance this one. * * @param size the number of code points * @return the limited code point iterator */ public final CodePointIterator limitedTo(final long size) { if (size <= 0 || ! hasNext()) { return EMPTY; } return new LimitedCodePointIterator(this, size); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int previous() { if (! hasPrevious()) { throw new NoSuchElementException(); } offset--; return iter.previous(); }
public int next() { if (! hasNext()) { throw new NoSuchElementException(); } offset++; return iter.next(); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) { throw new NoSuchElementException(); } return iter.peekPrevious(); }
/** * Return a copy of this iterator which is limited to the given number of code points after the current one. Advancing * the returned iterator will also advance this one. * * @param size the number of code points * @return the limited code point iterator */ public final CodePointIterator limitedTo(final long size) { if (size <= 0 || ! hasNext()) { return EMPTY; } return new LimitedCodePointIterator(this, size); }
public int next() { if (! hasNext()) { throw new NoSuchElementException(); } offset++; return iter.next(); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) { throw new NoSuchElementException(); } return iter.peekPrevious(); }
/** * Return a copy of this iterator which is limited to the given number of code points after the current one. Advancing * the returned iterator will also advance this one. * * @param size the number of code points * @return the limited code point iterator */ public final CodePointIterator limitedTo(final long size) { if (size <= 0 || ! hasNext()) { return EMPTY; } return new LimitedCodePointIterator(this, size); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int previous() { if (! hasPrevious()) { throw new NoSuchElementException(); } offset--; return iter.previous(); }
public int next() { if (! hasNext()) { throw new NoSuchElementException(); } offset++; return iter.next(); }
public int previous() { if (! hasPrevious()) { throw new NoSuchElementException(); } offset--; return iter.previous(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) { throw new NoSuchElementException(); } return iter.peekPrevious(); }