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

package it.unimi.dsi.fastutil.floats;

import java.util.Objects;
import it.unimi.dsi.fastutil.SafeMath;
import java.util.function.DoublePredicate;
import java.util.function.Predicate;

@FunctionalInterface
public interface FloatPredicate extends Predicate<Float>, DoublePredicate
{
    boolean test(final float p0);
    
    @Deprecated
    default boolean test(final double t) {
        return this.test(SafeMath.safeDoubleToFloat(t));
    }
    
    @Deprecated
    default boolean test(final Float t) {
        return this.test((float)t);
    }
    
    default FloatPredicate and(final FloatPredicate other) {
        Objects.requireNonNull(other);
        return t -> this.test(t) && other.test(t);
    }
    
    default FloatPredicate and(final DoublePredicate other) {
        FloatPredicate other2;
        if (other instanceof FloatPredicate) {
            other2 = (FloatPredicate)other;
        }
        else {
            Objects.requireNonNull(other);
            other2 = other::test;
        }
        return this.and(other2);
    }
    
    @Deprecated
    default Predicate<Float> and(final Predicate<? super Float> other) {
        return super.and(other);
    }
    
    default FloatPredicate negate() {
        return t -> !this.test(t);
    }
    
    default FloatPredicate or(final FloatPredicate other) {
        Objects.requireNonNull(other);
        return t -> this.test(t) || other.test(t);
    }
    
    default FloatPredicate or(final DoublePredicate other) {
        FloatPredicate other2;
        if (other instanceof FloatPredicate) {
            other2 = (FloatPredicate)other;
        }
        else {
            Objects.requireNonNull(other);
            other2 = other::test;
        }
        return this.or(other2);
    }
    
    @Deprecated
    default Predicate<Float> or(final Predicate<? super Float> other) {
        return super.or(other);
    }
}
