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

package it.unimi.dsi.fastutil.doubles;

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

public interface DoubleSpliterator extends Spliterator.OfDouble
{
    @Deprecated
    default boolean tryAdvance(final Consumer<? super Double> action) {
        DoubleConsumer doubleConsumer;
        if (action instanceof DoubleConsumer) {
            doubleConsumer = (DoubleConsumer)action;
        }
        else {
            Objects.requireNonNull(action);
            doubleConsumer = action::accept;
        }
        return this.tryAdvance(doubleConsumer);
    }
    
    default boolean tryAdvance(final it.unimi.dsi.fastutil.doubles.DoubleConsumer action) {
        return this.tryAdvance((DoubleConsumer)action);
    }
    
    @Deprecated
    default void forEachRemaining(final Consumer<? super Double> action) {
        DoubleConsumer action2;
        if (action instanceof DoubleConsumer) {
            action2 = (DoubleConsumer)action;
        }
        else {
            Objects.requireNonNull(action);
            action2 = action::accept;
        }
        this.forEachRemaining(action2);
    }
    
    default void forEachRemaining(final it.unimi.dsi.fastutil.doubles.DoubleConsumer action) {
        this.forEachRemaining((DoubleConsumer)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;
    }
    
    DoubleSpliterator trySplit();
    
    default DoubleComparator getComparator() {
        throw new IllegalStateException();
    }
}
