// 
// Decompiled by Procyon v0.6.0
// 

package it.unimi.dsi.fastutil.bytes;

import it.unimi.dsi.fastutil.SafeMath;
import java.util.function.IntConsumer;
import java.util.function.Consumer;
import java.util.NoSuchElementException;
import java.io.Serializable;
import java.util.Objects;
import java.util.function.IntPredicate;
import java.util.ListIterator;
import it.unimi.dsi.fastutil.ints.IntIterators;
import it.unimi.dsi.fastutil.ints.IntIterator;
import java.util.PrimitiveIterator;
import java.util.Iterator;
import it.unimi.dsi.fastutil.BigArrays;

public final class ByteIterators
{
    public static final EmptyIterator EMPTY_ITERATOR;
    
    private ByteIterators() {
    }
    
    public static ByteListIterator singleton(final byte element) {
        return new SingletonIterator(element);
    }
    
    public static ByteListIterator wrap(final byte[] array, final int offset, final int length) {
        ByteArrays.ensureOffsetLength(array, offset, length);
        return new ArrayIterator(array, offset, length);
    }
    
    public static ByteListIterator wrap(final byte[] array) {
        return new ArrayIterator(array, 0, array.length);
    }
    
    public static int unwrap(final ByteIterator i, final byte[] array, int offset, final int max) {
        if (max < 0) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        if (offset < 0 || offset + max > array.length) {
            throw new IllegalArgumentException();
        }
        int j = max;
        while (j-- != 0 && i.hasNext()) {
            array[offset++] = i.nextByte();
        }
        return max - j - 1;
    }
    
    public static int unwrap(final ByteIterator i, final byte[] array) {
        return unwrap(i, array, 0, array.length);
    }
    
    public static byte[] unwrap(final ByteIterator i, int max) {
        if (max < 0) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        byte[] array = new byte[16];
        int j = 0;
        while (max-- != 0 && i.hasNext()) {
            if (j == array.length) {
                array = ByteArrays.grow(array, j + 1);
            }
            array[j++] = i.nextByte();
        }
        return ByteArrays.trim(array, j);
    }
    
    public static byte[] unwrap(final ByteIterator i) {
        return unwrap(i, Integer.MAX_VALUE);
    }
    
    public static long unwrap(final ByteIterator i, final byte[][] array, long offset, final long max) {
        if (max < 0L) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        if (offset < 0L || offset + max > BigArrays.length(array)) {
            throw new IllegalArgumentException();
        }
        long j = max;
        while (j-- != 0L && i.hasNext()) {
            BigArrays.set(array, offset++, i.nextByte());
        }
        return max - j - 1L;
    }
    
    public static long unwrap(final ByteIterator i, final byte[][] array) {
        return unwrap(i, array, 0L, BigArrays.length(array));
    }
    
    public static int unwrap(final ByteIterator i, final ByteCollection c, final int max) {
        if (max < 0) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        int j = max;
        while (j-- != 0 && i.hasNext()) {
            c.add(i.nextByte());
        }
        return max - j - 1;
    }
    
    public static byte[][] unwrapBig(final ByteIterator i, long max) {
        if (max < 0L) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        byte[][] array = ByteBigArrays.newBigArray(16L);
        long j = 0L;
        while (max-- != 0L && i.hasNext()) {
            if (j == BigArrays.length(array)) {
                array = BigArrays.grow(array, j + 1L);
            }
            BigArrays.set(array, j++, i.nextByte());
        }
        return BigArrays.trim(array, j);
    }
    
    public static byte[][] unwrapBig(final ByteIterator i) {
        return unwrapBig(i, Long.MAX_VALUE);
    }
    
    public static long unwrap(final ByteIterator i, final ByteCollection c) {
        long n = 0L;
        while (i.hasNext()) {
            c.add(i.nextByte());
            ++n;
        }
        return n;
    }
    
    public static int pour(final ByteIterator i, final ByteCollection s, final int max) {
        if (max < 0) {
            throw new IllegalArgumentException("The maximum number of elements (" + max + ") is negative");
        }
        int j = max;
        while (j-- != 0 && i.hasNext()) {
            s.add(i.nextByte());
        }
        return max - j - 1;
    }
    
    public static int pour(final ByteIterator i, final ByteCollection s) {
        return pour(i, s, Integer.MAX_VALUE);
    }
    
    public static ByteList pour(final ByteIterator i, final int max) {
        final ByteArrayList l = new ByteArrayList();
        pour(i, l, max);
        l.trim();
        return l;
    }
    
    public static ByteList pour(final ByteIterator i) {
        return pour(i, Integer.MAX_VALUE);
    }
    
    public static ByteIterator asByteIterator(final Iterator i) {
        if (i instanceof ByteIterator) {
            return (ByteIterator)i;
        }
        return new IteratorWrapper(i);
    }
    
    public static ByteIterator narrow(final PrimitiveIterator.OfInt i) {
        return new CheckedPrimitiveIteratorWrapper(i);
    }
    
    public static ByteIterator uncheckedNarrow(final PrimitiveIterator.OfInt i) {
        return new PrimitiveIteratorWrapper(i);
    }
    
    public static IntIterator widen(final ByteIterator i) {
        return IntIterators.wrap(i);
    }
    
    public static ByteListIterator asByteIterator(final ListIterator i) {
        if (i instanceof ByteListIterator) {
            return (ByteListIterator)i;
        }
        return new ListIteratorWrapper(i);
    }
    
    public static boolean any(final ByteIterator iterator, final BytePredicate predicate) {
        return indexOf(iterator, predicate) != -1;
    }
    
    public static boolean any(final ByteIterator iterator, final IntPredicate predicate) {
        BytePredicate predicate2;
        if (predicate instanceof BytePredicate) {
            predicate2 = (BytePredicate)predicate;
        }
        else {
            Objects.requireNonNull(predicate);
            predicate2 = predicate::test;
        }
        return any(iterator, predicate2);
    }
    
    public static boolean all(final ByteIterator iterator, final BytePredicate predicate) {
        Objects.requireNonNull(predicate);
        while (iterator.hasNext()) {
            if (!predicate.test(iterator.nextByte())) {
                return false;
            }
        }
        return true;
    }
    
    public static boolean all(final ByteIterator iterator, final IntPredicate predicate) {
        BytePredicate predicate2;
        if (predicate instanceof BytePredicate) {
            predicate2 = (BytePredicate)predicate;
        }
        else {
            Objects.requireNonNull(predicate);
            predicate2 = predicate::test;
        }
        return all(iterator, predicate2);
    }
    
    public static int indexOf(final ByteIterator iterator, final BytePredicate predicate) {
        Objects.requireNonNull(predicate);
        int i = 0;
        while (iterator.hasNext()) {
            if (predicate.test(iterator.nextByte())) {
                return i;
            }
            ++i;
        }
        return -1;
    }
    
    public static int indexOf(final ByteIterator iterator, final IntPredicate predicate) {
        BytePredicate predicate2;
        if (predicate instanceof BytePredicate) {
            predicate2 = (BytePredicate)predicate;
        }
        else {
            Objects.requireNonNull(predicate);
            predicate2 = predicate::test;
        }
        return indexOf(iterator, predicate2);
    }
    
    public static ByteListIterator fromTo(final byte from, final byte to) {
        return new IntervalIterator(from, to);
    }
    
    public static ByteIterator concat(final ByteIterator... a) {
        return concat(a, 0, a.length);
    }
    
    public static ByteIterator concat(final ByteIterator[] a, final int offset, final int length) {
        return new IteratorConcatenator(a, offset, length);
    }
    
    public static ByteIterator unmodifiable(final ByteIterator i) {
        return new UnmodifiableIterator(i);
    }
    
    public static ByteBidirectionalIterator unmodifiable(final ByteBidirectionalIterator i) {
        return new UnmodifiableBidirectionalIterator(i);
    }
    
    public static ByteListIterator unmodifiable(final ByteListIterator i) {
        return new UnmodifiableListIterator(i);
    }
    
    static {
        EMPTY_ITERATOR = new EmptyIterator();
    }
    
    public static class EmptyIterator implements ByteListIterator, Serializable, Cloneable
    {
        private static final long serialVersionUID = -7046029254386353129L;
        
        protected EmptyIterator() {
        }
        
        @Override
        public boolean hasNext() {
            return false;
        }
        
        @Override
        public boolean hasPrevious() {
            return false;
        }
        
        @Override
        public byte nextByte() {
            throw new NoSuchElementException();
        }
        
        @Override
        public byte previousByte() {
            throw new NoSuchElementException();
        }
        
        @Override
        public int nextIndex() {
            return 0;
        }
        
        @Override
        public int previousIndex() {
            return -1;
        }
        
        @Override
        public int skip(final int n) {
            return 0;
        }
        
        @Override
        public int back(final int n) {
            return 0;
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
        }
        
        public Object clone() {
            return ByteIterators.EMPTY_ITERATOR;
        }
        
        private Object readResolve() {
            return ByteIterators.EMPTY_ITERATOR;
        }
    }
    
    private static class SingletonIterator implements ByteListIterator
    {
        private final byte element;
        private byte curr;
        
        public SingletonIterator(final byte element) {
            this.element = element;
        }
        
        @Override
        public boolean hasNext() {
            return this.curr == 0;
        }
        
        @Override
        public boolean hasPrevious() {
            return this.curr == 1;
        }
        
        @Override
        public byte nextByte() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            this.curr = 1;
            return this.element;
        }
        
        @Override
        public byte previousByte() {
            if (!this.hasPrevious()) {
                throw new NoSuchElementException();
            }
            this.curr = 0;
            return this.element;
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            Objects.requireNonNull(action);
            if (this.curr == 0) {
                action.accept(this.element);
                this.curr = 1;
            }
        }
        
        @Override
        public int nextIndex() {
            return this.curr;
        }
        
        @Override
        public int previousIndex() {
            return this.curr - 1;
        }
        
        @Override
        public int back(final int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            if (n == 0 || this.curr < 1) {
                return 0;
            }
            this.curr = 1;
            return 1;
        }
        
        @Override
        public int skip(final int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            if (n == 0 || this.curr > 0) {
                return 0;
            }
            this.curr = 0;
            return 1;
        }
    }
    
    private static class ArrayIterator implements ByteListIterator
    {
        private final byte[] array;
        private final int offset;
        private final int length;
        private int curr;
        
        public ArrayIterator(final byte[] array, final int offset, final int length) {
            this.array = array;
            this.offset = offset;
            this.length = length;
        }
        
        @Override
        public boolean hasNext() {
            return this.curr < this.length;
        }
        
        @Override
        public boolean hasPrevious() {
            return this.curr > 0;
        }
        
        @Override
        public byte nextByte() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            return this.array[this.offset + this.curr++];
        }
        
        @Override
        public byte previousByte() {
            if (!this.hasPrevious()) {
                throw new NoSuchElementException();
            }
            final byte[] array = this.array;
            final int offset = this.offset;
            final int curr = this.curr - 1;
            this.curr = curr;
            return array[offset + curr];
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            Objects.requireNonNull(action);
            while (this.curr < this.length) {
                action.accept(this.array[this.offset + this.curr]);
                ++this.curr;
            }
        }
        
        @Override
        public int skip(int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            if (n <= this.length - this.curr) {
                this.curr += n;
                return n;
            }
            n = this.length - this.curr;
            this.curr = this.length;
            return n;
        }
        
        @Override
        public int back(int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            if (n <= this.curr) {
                this.curr -= n;
                return n;
            }
            n = this.curr;
            this.curr = 0;
            return n;
        }
        
        @Override
        public int nextIndex() {
            return this.curr;
        }
        
        @Override
        public int previousIndex() {
            return this.curr - 1;
        }
    }
    
    private static class IteratorWrapper implements ByteIterator
    {
        final Iterator<Byte> i;
        
        public IteratorWrapper(final Iterator<Byte> i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public void remove() {
            this.i.remove();
        }
        
        @Override
        public byte nextByte() {
            return this.i.next();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(action);
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            this.i.forEachRemaining(action);
        }
    }
    
    private static class PrimitiveIteratorWrapper implements ByteIterator
    {
        final PrimitiveIterator.OfInt i;
        
        public PrimitiveIteratorWrapper(final PrimitiveIterator.OfInt i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public void remove() {
            this.i.remove();
        }
        
        @Override
        public byte nextByte() {
            return (byte)this.i.nextInt();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining((IntConsumer)action);
        }
    }
    
    private static class CheckedPrimitiveIteratorWrapper extends PrimitiveIteratorWrapper
    {
        public CheckedPrimitiveIteratorWrapper(final PrimitiveIterator.OfInt i) {
            super(i);
        }
        
        @Override
        public byte nextByte() {
            return SafeMath.safeIntToByte(this.i.nextInt());
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(value -> action.accept(SafeMath.safeIntToByte(value)));
        }
    }
    
    private static class ListIteratorWrapper implements ByteListIterator
    {
        final ListIterator<Byte> i;
        
        public ListIteratorWrapper(final ListIterator<Byte> i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public boolean hasPrevious() {
            return this.i.hasPrevious();
        }
        
        @Override
        public int nextIndex() {
            return this.i.nextIndex();
        }
        
        @Override
        public int previousIndex() {
            return this.i.previousIndex();
        }
        
        @Override
        public void set(final byte k) {
            this.i.set(k);
        }
        
        @Override
        public void add(final byte k) {
            this.i.add(k);
        }
        
        @Override
        public void remove() {
            this.i.remove();
        }
        
        @Override
        public byte nextByte() {
            return this.i.next();
        }
        
        @Override
        public byte previousByte() {
            return this.i.previous();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(action);
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            this.i.forEachRemaining(action);
        }
    }
    
    public abstract static class AbstractIndexBasedIterator extends AbstractByteIterator
    {
        protected final int minPos;
        protected int pos;
        protected int lastReturned;
        
        protected AbstractIndexBasedIterator(final int minPos, final int initialPos) {
            this.minPos = minPos;
            this.pos = initialPos;
        }
        
        protected abstract byte get(final int p0);
        
        protected abstract void remove(final int p0);
        
        protected abstract int getMaxPos();
        
        @Override
        public boolean hasNext() {
            return this.pos < this.getMaxPos();
        }
        
        @Override
        public byte nextByte() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            final int lastReturned = this.pos++;
            this.lastReturned = lastReturned;
            return this.get(lastReturned);
        }
        
        @Override
        public void remove() {
            if (this.lastReturned == -1) {
                throw new IllegalStateException();
            }
            this.remove(this.lastReturned);
            if (this.lastReturned < this.pos) {
                --this.pos;
            }
            this.lastReturned = -1;
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            while (this.pos < this.getMaxPos()) {
                final int lastReturned = this.pos++;
                this.lastReturned = lastReturned;
                action.accept(this.get(lastReturned));
            }
        }
        
        @Override
        public int skip(int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            final int max = this.getMaxPos();
            final int remaining = max - this.pos;
            if (n < remaining) {
                this.pos += n;
            }
            else {
                n = remaining;
                this.pos = max;
            }
            this.lastReturned = this.pos - 1;
            return n;
        }
    }
    
    public abstract static class AbstractIndexBasedListIterator extends AbstractIndexBasedIterator implements ByteListIterator
    {
        protected AbstractIndexBasedListIterator(final int minPos, final int initialPos) {
            super(minPos, initialPos);
        }
        
        protected abstract void add(final int p0, final byte p1);
        
        protected abstract void set(final int p0, final byte p1);
        
        @Override
        public boolean hasPrevious() {
            return this.pos > this.minPos;
        }
        
        @Override
        public byte previousByte() {
            if (!this.hasPrevious()) {
                throw new NoSuchElementException();
            }
            final int n = this.pos - 1;
            this.pos = n;
            this.lastReturned = n;
            return this.get(n);
        }
        
        @Override
        public int nextIndex() {
            return this.pos;
        }
        
        @Override
        public int previousIndex() {
            return this.pos - 1;
        }
        
        @Override
        public void add(final byte k) {
            this.add(this.pos++, k);
            this.lastReturned = -1;
        }
        
        @Override
        public void set(final byte k) {
            if (this.lastReturned == -1) {
                throw new IllegalStateException();
            }
            this.set(this.lastReturned, k);
        }
        
        @Override
        public int back(int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            final int remaining = this.pos - this.minPos;
            if (n < remaining) {
                this.pos -= n;
            }
            else {
                n = remaining;
                this.pos = this.minPos;
            }
            this.lastReturned = this.pos;
            return n;
        }
    }
    
    private static class IntervalIterator implements ByteListIterator
    {
        private final byte from;
        private final byte to;
        byte curr;
        
        public IntervalIterator(final byte from, final byte to) {
            this.curr = from;
            this.from = from;
            this.to = to;
        }
        
        @Override
        public boolean hasNext() {
            return this.curr < this.to;
        }
        
        @Override
        public boolean hasPrevious() {
            return this.curr > this.from;
        }
        
        @Override
        public byte nextByte() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            final byte curr = this.curr;
            this.curr = (byte)(curr + 1);
            return curr;
        }
        
        @Override
        public byte previousByte() {
            if (!this.hasPrevious()) {
                throw new NoSuchElementException();
            }
            return (byte)(--this.curr);
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            Objects.requireNonNull(action);
            while (this.curr < this.to) {
                action.accept(this.curr);
                ++this.curr;
            }
        }
        
        @Override
        public int nextIndex() {
            return this.curr - this.from;
        }
        
        @Override
        public int previousIndex() {
            return this.curr - this.from - 1;
        }
        
        @Override
        public int skip(int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            if (this.curr + n <= this.to) {
                this.curr += (byte)n;
                return n;
            }
            n = this.to - this.curr;
            this.curr = this.to;
            return n;
        }
        
        @Override
        public int back(int n) {
            if (this.curr - n >= this.from) {
                this.curr -= (byte)n;
                return n;
            }
            n = this.curr - this.from;
            this.curr = this.from;
            return n;
        }
    }
    
    private static class IteratorConcatenator implements ByteIterator
    {
        final ByteIterator[] a;
        int offset;
        int length;
        int lastOffset;
        
        public IteratorConcatenator(final ByteIterator[] a, final int offset, final int length) {
            this.lastOffset = -1;
            this.a = a;
            this.offset = offset;
            this.length = length;
            this.advance();
        }
        
        private void advance() {
            while (this.length != 0 && !this.a[this.offset].hasNext()) {
                --this.length;
                ++this.offset;
            }
        }
        
        @Override
        public boolean hasNext() {
            return this.length > 0;
        }
        
        @Override
        public byte nextByte() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            final ByteIterator[] a = this.a;
            final int offset = this.offset;
            this.lastOffset = offset;
            final byte next = a[offset].nextByte();
            this.advance();
            return next;
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            while (this.length > 0) {
                final ByteIterator[] a = this.a;
                final int offset = this.offset;
                this.lastOffset = offset;
                a[offset].forEachRemaining(action);
                this.advance();
            }
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            while (this.length > 0) {
                final ByteIterator[] a = this.a;
                final int offset = this.offset;
                this.lastOffset = offset;
                a[offset].forEachRemaining(action);
                this.advance();
            }
        }
        
        @Override
        public void remove() {
            if (this.lastOffset == -1) {
                throw new IllegalStateException();
            }
            this.a[this.lastOffset].remove();
        }
        
        @Override
        public int skip(final int n) {
            if (n < 0) {
                throw new IllegalArgumentException("Argument must be nonnegative: " + n);
            }
            this.lastOffset = -1;
            int skipped = 0;
            while (skipped < n && this.length != 0) {
                skipped += this.a[this.offset].skip(n - skipped);
                if (this.a[this.offset].hasNext()) {
                    break;
                }
                --this.length;
                ++this.offset;
            }
            return skipped;
        }
    }
    
    public static class UnmodifiableIterator implements ByteIterator
    {
        protected final ByteIterator i;
        
        public UnmodifiableIterator(final ByteIterator i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public byte nextByte() {
            return this.i.nextByte();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(action);
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            this.i.forEachRemaining(action);
        }
    }
    
    public static class UnmodifiableBidirectionalIterator implements ByteBidirectionalIterator
    {
        protected final ByteBidirectionalIterator i;
        
        public UnmodifiableBidirectionalIterator(final ByteBidirectionalIterator i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public boolean hasPrevious() {
            return this.i.hasPrevious();
        }
        
        @Override
        public byte nextByte() {
            return this.i.nextByte();
        }
        
        @Override
        public byte previousByte() {
            return this.i.previousByte();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(action);
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            this.i.forEachRemaining(action);
        }
    }
    
    public static class UnmodifiableListIterator implements ByteListIterator
    {
        protected final ByteListIterator i;
        
        public UnmodifiableListIterator(final ByteListIterator i) {
            this.i = i;
        }
        
        @Override
        public boolean hasNext() {
            return this.i.hasNext();
        }
        
        @Override
        public boolean hasPrevious() {
            return this.i.hasPrevious();
        }
        
        @Override
        public byte nextByte() {
            return this.i.nextByte();
        }
        
        @Override
        public byte previousByte() {
            return this.i.previousByte();
        }
        
        @Override
        public int nextIndex() {
            return this.i.nextIndex();
        }
        
        @Override
        public int previousIndex() {
            return this.i.previousIndex();
        }
        
        @Override
        public void forEachRemaining(final ByteConsumer action) {
            this.i.forEachRemaining(action);
        }
        
        @Deprecated
        @Override
        public void forEachRemaining(final Consumer<? super Byte> action) {
            this.i.forEachRemaining(action);
        }
    }
}
