/** * Get a sub-iterator that is delimited by the given code points. The returned iterator offset starts at 0 and cannot * be backed up before that point. The returned iterator will return {@code false} for {@code hasNext()} if the next * character in the encapsulated iterator is a delimiter or if the underlying iterator returns {@code false} for * {@code hasNext()}. * * @param delims the code point delimiters * @return the sub-iterator */ public final CodePointIterator delimitedBy(final int... delims) { if ((delims == null) || (delims.length == 0) || ! hasNext()) { return EMPTY; } return new DelimitedCodePointIterator(this, delims); }
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 boolean hasNext() { return iter.hasNext() && ! isDelim(iter.peekNext()); }
public boolean hasNext() { return iter.hasNext() && ! isDelim(iter.peekNext()); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); return iter.peekPrevious(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) throw new NoSuchElementException(); return iter.peekNext(); }
public boolean hasNext() { return iter.hasNext() && ! isDelim(iter.peekNext()); }
/** * Get a sub-iterator that is delimited by the given code points. The returned iterator offset starts at 0 and cannot * be backed up before that point. The returned iterator will return {@code false} for {@code hasNext()} if the next * character in the encapsulated iterator is a delimiter or if the underlying iterator returns {@code false} for * {@code hasNext()}. * * @param delims the code point delimiters * @return the sub-iterator */ public final CodePointIterator delimitedBy(final int... delims) { if ((delims == null) || (delims.length == 0) || ! hasNext()) { return EMPTY; } return new DelimitedCodePointIterator(this, delims); }
public int previous() { if (! hasPrevious()) throw new NoSuchElementException(); offset--; return iter.previous(); }
public int next() { if (! hasNext()) throw new NoSuchElementException(); offset++; return iter.next(); }
/** * Get a sub-iterator that is delimited by the given code points. The returned iterator offset starts at 0 and cannot * be backed up before that point. The returned iterator will return {@code false} for {@code hasNext()} if the next * character in the encapsulated iterator is a delimiter or if the underlying iterator returns {@code false} for * {@code hasNext()}. * * @param delims the code point delimiters * @return the sub-iterator */ public final CodePointIterator delimitedBy(final int... delims) { if ((delims == null) || (delims.length == 0) || ! hasNext()) { return EMPTY; } return new DelimitedCodePointIterator(this, delims); }
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(); }
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(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) throw new NoSuchElementException(); return iter.peekNext(); }