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

package it.unimi.dsi.fastutil.bytes;

import it.unimi.dsi.fastutil.objects.Reference2ObjectFunction;
import it.unimi.dsi.fastutil.objects.Reference2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2ReferenceFunction;
import it.unimi.dsi.fastutil.objects.Object2ObjectFunction;
import it.unimi.dsi.fastutil.doubles.Double2ObjectFunction;
import it.unimi.dsi.fastutil.doubles.Double2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2DoubleFunction;
import it.unimi.dsi.fastutil.floats.Float2ObjectFunction;
import it.unimi.dsi.fastutil.floats.Float2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2FloatFunction;
import it.unimi.dsi.fastutil.chars.Char2ObjectFunction;
import it.unimi.dsi.fastutil.chars.Char2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2CharFunction;
import it.unimi.dsi.fastutil.longs.Long2ObjectFunction;
import it.unimi.dsi.fastutil.longs.Long2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2LongFunction;
import it.unimi.dsi.fastutil.ints.Int2ObjectFunction;
import it.unimi.dsi.fastutil.ints.Int2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2IntFunction;
import it.unimi.dsi.fastutil.shorts.Short2ObjectFunction;
import it.unimi.dsi.fastutil.shorts.Short2ByteFunction;
import it.unimi.dsi.fastutil.objects.Object2ShortFunction;
import it.unimi.dsi.fastutil.objects.Object2ByteFunction;
import it.unimi.dsi.fastutil.SafeMath;
import java.util.function.IntFunction;
import it.unimi.dsi.fastutil.Function;

@FunctionalInterface
public interface Byte2ObjectFunction<V> extends Function<Byte, V>, IntFunction<V>
{
    @Deprecated
    default V apply(final int operand) {
        return this.get(SafeMath.safeIntToByte(operand));
    }
    
    default V put(final byte key, final V value) {
        throw new UnsupportedOperationException();
    }
    
    V get(final byte p0);
    
    default V getOrDefault(final byte key, final V defaultValue) {
        final V v;
        return ((v = this.get(key)) != this.defaultReturnValue() || this.containsKey(key)) ? v : defaultValue;
    }
    
    default V remove(final byte key) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default V put(final Byte key, final V value) {
        final byte k = key;
        final boolean containsKey = this.containsKey(k);
        final V v = this.put(k, value);
        return containsKey ? v : null;
    }
    
    @Deprecated
    default V get(final Object key) {
        if (key == null) {
            return null;
        }
        final byte k = (byte)key;
        final V v;
        return ((v = this.get(k)) != this.defaultReturnValue() || this.containsKey(k)) ? v : null;
    }
    
    @Deprecated
    default V getOrDefault(final Object key, final V defaultValue) {
        if (key == null) {
            return defaultValue;
        }
        final byte k = (byte)key;
        final V v = this.get(k);
        return (v != this.defaultReturnValue() || this.containsKey(k)) ? v : defaultValue;
    }
    
    @Deprecated
    default V remove(final Object key) {
        if (key == null) {
            return null;
        }
        final byte k = (byte)key;
        return this.containsKey(k) ? 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 V rv) {
        throw new UnsupportedOperationException();
    }
    
    default V defaultReturnValue() {
        return null;
    }
    
    @Deprecated
    default <T> java.util.function.Function<T, V> compose(final java.util.function.Function<? super T, ? extends Byte> before) {
        return super.compose((java.util.function.Function<? super T, ?>)before);
    }
    
    default Byte2ByteFunction andThenByte(final Object2ByteFunction<V> after) {
        return k -> after.getByte(this.get(k));
    }
    
    default Byte2ObjectFunction<V> composeByte(final Byte2ByteFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Byte2ShortFunction andThenShort(final Object2ShortFunction<V> after) {
        return k -> after.getShort(this.get(k));
    }
    
    default Short2ObjectFunction<V> composeShort(final Short2ByteFunction before) {
        return (Short2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default Byte2IntFunction andThenInt(final Object2IntFunction<V> after) {
        return k -> after.getInt(this.get(k));
    }
    
    default Int2ObjectFunction<V> composeInt(final Int2ByteFunction before) {
        return (Int2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default Byte2LongFunction andThenLong(final Object2LongFunction<V> after) {
        return k -> after.getLong(this.get(k));
    }
    
    default Long2ObjectFunction<V> composeLong(final Long2ByteFunction before) {
        return (Long2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default Byte2CharFunction andThenChar(final Object2CharFunction<V> after) {
        return k -> after.getChar(this.get(k));
    }
    
    default Char2ObjectFunction<V> composeChar(final Char2ByteFunction before) {
        return (Char2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default Byte2FloatFunction andThenFloat(final Object2FloatFunction<V> after) {
        return k -> after.getFloat(this.get(k));
    }
    
    default Float2ObjectFunction<V> composeFloat(final Float2ByteFunction before) {
        return (Float2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default Byte2DoubleFunction andThenDouble(final Object2DoubleFunction<V> after) {
        return k -> after.getDouble(this.get(k));
    }
    
    default Double2ObjectFunction<V> composeDouble(final Double2ByteFunction before) {
        return (Double2ObjectFunction<V>)(k -> this.get(before.get(k)));
    }
    
    default <T> Byte2ObjectFunction<T> andThenObject(final Object2ObjectFunction<? super V, ? extends T> after) {
        return k -> after.get(this.get(k));
    }
    
    default <T> Object2ObjectFunction<T, V> composeObject(final Object2ByteFunction<? super T> before) {
        return (Object2ObjectFunction<T, V>)(k -> this.get(before.getByte(k)));
    }
    
    default <T> Byte2ReferenceFunction<T> andThenReference(final Object2ReferenceFunction<? super V, ? extends T> after) {
        return (Byte2ReferenceFunction<T>)(k -> after.get(this.get(k)));
    }
    
    default <T> Reference2ObjectFunction<T, V> composeReference(final Reference2ByteFunction<? super T> before) {
        return (Reference2ObjectFunction<T, V>)(k -> this.get(before.getByte(k)));
    }
}
