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

package it.unimi.dsi.fastutil.bytes;

import it.unimi.dsi.fastutil.objects.Reference2BooleanFunction;
import it.unimi.dsi.fastutil.objects.Reference2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2ReferenceFunction;
import it.unimi.dsi.fastutil.objects.Object2BooleanFunction;
import it.unimi.dsi.fastutil.objects.Object2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2ObjectFunction;
import it.unimi.dsi.fastutil.doubles.Double2BooleanFunction;
import it.unimi.dsi.fastutil.doubles.Double2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2DoubleFunction;
import it.unimi.dsi.fastutil.floats.Float2BooleanFunction;
import it.unimi.dsi.fastutil.floats.Float2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2FloatFunction;
import it.unimi.dsi.fastutil.chars.Char2BooleanFunction;
import it.unimi.dsi.fastutil.chars.Char2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2CharFunction;
import it.unimi.dsi.fastutil.longs.Long2BooleanFunction;
import it.unimi.dsi.fastutil.longs.Long2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2LongFunction;
import it.unimi.dsi.fastutil.ints.Int2BooleanFunction;
import it.unimi.dsi.fastutil.ints.Int2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2IntFunction;
import it.unimi.dsi.fastutil.shorts.Short2BooleanFunction;
import it.unimi.dsi.fastutil.shorts.Short2ByteFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2ShortFunction;
import it.unimi.dsi.fastutil.booleans.Boolean2ByteFunction;
import it.unimi.dsi.fastutil.SafeMath;
import java.util.function.IntPredicate;
import it.unimi.dsi.fastutil.Function;

@FunctionalInterface
public interface Byte2BooleanFunction extends Function<Byte, Boolean>, IntPredicate
{
    @Deprecated
    default boolean test(final int operand) {
        return this.get(SafeMath.safeIntToByte(operand));
    }
    
    default boolean put(final byte key, final boolean value) {
        throw new UnsupportedOperationException();
    }
    
    boolean get(final byte p0);
    
    default boolean getOrDefault(final byte key, final boolean defaultValue) {
        final boolean v;
        return ((v = this.get(key)) != this.defaultReturnValue() || this.containsKey(key)) ? v : defaultValue;
    }
    
    default boolean remove(final byte key) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default Boolean put(final Byte key, final Boolean value) {
        final byte k = key;
        final boolean containsKey = this.containsKey(k);
        final boolean v = this.put(k, (boolean)value);
        return containsKey ? Boolean.valueOf(v) : null;
    }
    
    @Deprecated
    default Boolean get(final Object key) {
        if (key == null) {
            return null;
        }
        final byte k = (byte)key;
        final boolean v;
        return ((v = this.get(k)) != this.defaultReturnValue() || this.containsKey(k)) ? Boolean.valueOf(v) : null;
    }
    
    @Deprecated
    default Boolean getOrDefault(final Object key, final Boolean defaultValue) {
        if (key == null) {
            return defaultValue;
        }
        final byte k = (byte)key;
        final boolean v = this.get(k);
        return (v != this.defaultReturnValue() || this.containsKey(k)) ? Boolean.valueOf(v) : defaultValue;
    }
    
    @Deprecated
    default Boolean remove(final Object key) {
        if (key == null) {
            return null;
        }
        final byte k = (byte)key;
        return this.containsKey(k) ? Boolean.valueOf(this.remove(k)) : null;
    }
    
    default boolean containsKey(final byte key) {
        return true;
    }
    
    @Deprecated
    default boolean containsKey(final Object key) {
        return key != null && this.containsKey((byte)key);
    }
    
    default void defaultReturnValue(final boolean rv) {
        throw new UnsupportedOperationException();
    }
    
    default boolean defaultReturnValue() {
        return false;
    }
    
    @Deprecated
    default <T> java.util.function.Function<T, Boolean> compose(final java.util.function.Function<? super T, ? extends Byte> before) {
        return super.compose((java.util.function.Function<? super T, ?>)before);
    }
    
    @Deprecated
    default <T> java.util.function.Function<Byte, T> andThen(final java.util.function.Function<? super Boolean, ? extends T> after) {
        return super.andThen((java.util.function.Function<? super Object, ? extends T>)after);
    }
    
    default Byte2ByteFunction andThenByte(final Boolean2ByteFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Byte2BooleanFunction composeByte(final Byte2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2ShortFunction andThenShort(final Boolean2ShortFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Short2BooleanFunction composeShort(final Short2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2IntFunction andThenInt(final Boolean2IntFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Int2BooleanFunction composeInt(final Int2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2LongFunction andThenLong(final Boolean2LongFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Long2BooleanFunction composeLong(final Long2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2CharFunction andThenChar(final Boolean2CharFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Char2BooleanFunction composeChar(final Char2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2FloatFunction andThenFloat(final Boolean2FloatFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Float2BooleanFunction composeFloat(final Float2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2DoubleFunction andThenDouble(final Boolean2DoubleFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Double2BooleanFunction composeDouble(final Double2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default <T> Byte2ObjectFunction<T> andThenObject(final Boolean2ObjectFunction<? extends T> after) {
        return (Byte2ObjectFunction<T>)(k -> after.get(this.get(k)));
    }
    
    default <T> Object2BooleanFunction<T> composeObject(final Object2ByteFunction<? super T> before) {
        return k -> this.get(before.getByte(k));
    }
    
    default <T> Byte2ReferenceFunction<T> andThenReference(final Boolean2ReferenceFunction<? extends T> after) {
        return (Byte2ReferenceFunction<T>)(k -> after.get(this.get(k)));
    }
    
    default <T> Reference2BooleanFunction<T> composeReference(final Reference2ByteFunction<? super T> before) {
        return k -> this.get(before.getByte(k));
    }
}
