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

package it.unimi.dsi.fastutil.longs;

import java.util.Comparator;
import java.util.Objects;
import java.util.function.LongConsumer;
import java.util.function.Consumer;
import java.util.Spliterator;

public interface LongSpliterator extends Spliterator.OfLong
{
    @Deprecated
    default boolean tryAdvance(final Consumer<? super Long> action) {
        LongConsumer longConsumer;
        if (action instanceof LongConsumer) {
            longConsumer = (LongConsumer)action;
        }
        else {
            Objects.requireNonNull(action);
            longConsumer = action::accept;
        }
        return this.tryAdvance(longConsumer);
    }
    
    default boolean tryAdvance(final it.unimi.dsi.fastutil.longs.LongConsumer action) {
        return this.tryAdvance((LongConsumer)action);
    }
    
    @Deprecated
    default void forEachRemaining(final Consumer<? super Long> action) {
        LongConsumer action2;
        if (action instanceof LongConsumer) {
            action2 = (LongConsumer)action;
        }
        else {
            Objects.requireNonNull(action);
            action2 = action::accept;
        }
        this.forEachRemaining(action2);
    }
    
    default void forEachRemaining(final it.unimi.dsi.fastutil.longs.LongConsumer action) {
        this.forEachRemaining((LongConsumer)action);
    }
    
    default long skip(final long n) {
        if (n < 0L) {
            throw new IllegalArgumentException("Argument must be nonnegative: " + n);
        }
        long i = n;
        while (i-- != 0L && this.tryAdvance(unused -> {})) {}
        return n - i - 1L;
    }
    
    LongSpliterator trySplit();
    
    default LongComparator getComparator() {
        throw new IllegalStateException();
    }
}
