/** * Get a concatenated byte iterator. The array and the byte iterators in the array must not be modified or * inconsistent behavior will result. * * @param iterators the iterators array (must not be {@code null} or contain {@code null} elements) * @return a concatenated iterator */ public static ByteIterator ofIterators(ByteIterator... iterators) { Assert.checkNotNullParam("iterators", iterators); if (iterators.length == 0) return EMPTY; if (iterators.length == 1) return iterators[0]; return new ConcatByteIterator(iterators); }
public boolean hasNext() { return seekNext() != -1; }
public boolean hasPrevious() { return seekPrevious() != -1; }
public int peekNext() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); return iterators[seek].peekNext(); }
public int peekPrevious() throws NoSuchElementException { final int seek = seekPrevious(); if (seek == -1) throw new NoSuchElementException(); return iterators[seek].peekPrevious(); }
/** * Get a concatenated byte iterator. The array and the byte iterators in the array must not be modified or * inconsistent behavior will result. * * @param iterators the iterators array (must not be {@code null} or contain {@code null} elements) * @return a concatenated iterator */ public static ByteIterator ofIterators(ByteIterator... iterators) { Assert.checkNotNullParam("iterators", iterators); if (iterators.length == 0) return EMPTY; if (iterators.length == 1) return iterators[0]; return new ConcatByteIterator(iterators); }
public int next() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); final int next = iterators[seek].next(); index++; return next; }
public int previous() throws NoSuchElementException { final int seek = seekPrevious(); if (seek == -1) throw new NoSuchElementException(); final int previous = iterators[seek].previous(); index--; return previous; }
/** * Get a concatenated byte iterator. The array and the byte iterators in the array must not be modified or * inconsistent behavior will result. * * @param iterators the iterators array (must not be {@code null} or contain {@code null} elements) * @return a concatenated iterator */ public static ByteIterator ofIterators(ByteIterator... iterators) { Assert.checkNotNullParam("iterators", iterators); if (iterators.length == 0) return EMPTY; if (iterators.length == 1) return iterators[0]; return new ConcatByteIterator(iterators); }
public boolean hasNext() { return seekNext() != -1; }
public boolean hasPrevious() { return seekPrevious() != -1; }
public boolean hasNext() { return seekNext() != -1; }
public boolean hasPrevious() { return seekPrevious() != -1; }
public int next() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); final int next = iterators[seek].next(); index++; return next; }
public int peekPrevious() throws NoSuchElementException { final int seek = seekPrevious(); if (seek == -1) throw new NoSuchElementException(); return iterators[seek].peekPrevious(); }
public int next() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); final int next = iterators[seek].next(); index++; return next; }
public int previous() throws NoSuchElementException { final int seek = seekPrevious(); if (seek == -1) throw new NoSuchElementException(); final int previous = iterators[seek].previous(); index--; return previous; }
public int peekNext() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); return iterators[seek].peekNext(); }
public int previous() throws NoSuchElementException { final int seek = seekPrevious(); if (seek == -1) throw new NoSuchElementException(); final int previous = iterators[seek].previous(); index--; return previous; }
public int peekNext() throws NoSuchElementException { final int seek = seekNext(); if (seek == -1) throw new NoSuchElementException(); return iterators[seek].peekNext(); }