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

package it.unimi.dsi.fastutil.ints;

import it.unimi.dsi.fastutil.objects.Reference2LongFunction;
import it.unimi.dsi.fastutil.objects.Reference2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2ReferenceFunction;
import it.unimi.dsi.fastutil.objects.Object2LongFunction;
import it.unimi.dsi.fastutil.objects.Object2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2ObjectFunction;
import it.unimi.dsi.fastutil.doubles.Double2LongFunction;
import it.unimi.dsi.fastutil.doubles.Double2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2DoubleFunction;
import it.unimi.dsi.fastutil.floats.Float2LongFunction;
import it.unimi.dsi.fastutil.floats.Float2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2FloatFunction;
import it.unimi.dsi.fastutil.chars.Char2LongFunction;
import it.unimi.dsi.fastutil.chars.Char2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2CharFunction;
import it.unimi.dsi.fastutil.longs.Long2LongFunction;
import it.unimi.dsi.fastutil.longs.Long2IntFunction;
import it.unimi.dsi.fastutil.shorts.Short2LongFunction;
import it.unimi.dsi.fastutil.shorts.Short2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2ShortFunction;
import it.unimi.dsi.fastutil.bytes.Byte2LongFunction;
import it.unimi.dsi.fastutil.bytes.Byte2IntFunction;
import it.unimi.dsi.fastutil.longs.Long2ByteFunction;
import java.util.function.IntToLongFunction;
import it.unimi.dsi.fastutil.Function;

@FunctionalInterface
public interface Int2LongFunction extends Function<Integer, Long>, IntToLongFunction
{
    default long applyAsLong(final int operand) {
        return this.get(operand);
    }
    
    default long put(final int key, final long value) {
        throw new UnsupportedOperationException();
    }
    
    long get(final int p0);
    
    default long getOrDefault(final int key, final long defaultValue) {
        final long v;
        return ((v = this.get(key)) != this.defaultReturnValue() || this.containsKey(key)) ? v : defaultValue;
    }
    
    default long remove(final int key) {
        throw new UnsupportedOperationException();
    }
    
    @Deprecated
    default Long put(final Integer key, final Long value) {
        final int k = key;
        final boolean containsKey = this.containsKey(k);
        final long v = this.put(k, (long)value);
        return containsKey ? Long.valueOf(v) : null;
    }
    
    @Deprecated
    default Long get(final Object key) {
        if (key == null) {
            return null;
        }
        final int k = (int)key;
        final long v;
        return ((v = this.get(k)) != this.defaultReturnValue() || this.containsKey(k)) ? Long.valueOf(v) : null;
    }
    
    @Deprecated
    default Long getOrDefault(final Object key, final Long defaultValue) {
        if (key == null) {
            return defaultValue;
        }
        final int k = (int)key;
        final long v = this.get(k);
        return (v != this.defaultReturnValue() || this.containsKey(k)) ? Long.valueOf(v) : defaultValue;
    }
    
    @Deprecated
    default Long remove(final Object key) {
        if (key == null) {
            return null;
        }
        final int k = (int)key;
        return this.containsKey(k) ? Long.valueOf(this.remove(k)) : null;
    }
    
    default boolean containsKey(final int key) {
        return true;
    }
    
    @Deprecated
    default boolean containsKey(final Object key) {
        return key != null && this.containsKey((int)key);
    }
    
    default void defaultReturnValue(final long rv) {
        throw new UnsupportedOperationException();
    }
    
    default long defaultReturnValue() {
        return 0L;
    }
    
    @Deprecated
    default <T> java.util.function.Function<T, Long> compose(final java.util.function.Function<? super T, ? extends Integer> before) {
        return super.compose((java.util.function.Function<? super T, ?>)before);
    }
    
    @Deprecated
    default <T> java.util.function.Function<Integer, T> andThen(final java.util.function.Function<? super Long, ? extends T> after) {
        return super.andThen((java.util.function.Function<? super Object, ? extends T>)after);
    }
    
    default Int2ByteFunction andThenByte(final Long2ByteFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Byte2LongFunction composeByte(final Byte2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2ShortFunction andThenShort(final Long2ShortFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Short2LongFunction composeShort(final Short2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2IntFunction andThenInt(final Long2IntFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Int2LongFunction composeInt(final Int2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2LongFunction andThenLong(final Long2LongFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Long2LongFunction composeLong(final Long2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2CharFunction andThenChar(final Long2CharFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Char2LongFunction composeChar(final Char2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2FloatFunction andThenFloat(final Long2FloatFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Float2LongFunction composeFloat(final Float2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default Int2DoubleFunction andThenDouble(final Long2DoubleFunction after) {
        return k -> after.get(this.get(k));
    }
    
    default Double2LongFunction composeDouble(final Double2IntFunction before) {
        return k -> this.get(before.get(k));
    }
    
    default <T> Int2ObjectFunction<T> andThenObject(final Long2ObjectFunction<? extends T> after) {
        return (Int2ObjectFunction<T>)(k -> after.get(this.get(k)));
    }
    
    default <T> Object2LongFunction<T> composeObject(final Object2IntFunction<? super T> before) {
        return k -> this.get(before.getInt(k));
    }
    
    default <T> Int2ReferenceFunction<T> andThenReference(final Long2ReferenceFunction<? extends T> after) {
        return (Int2ReferenceFunction<T>)(k -> after.get(this.get(k)));
    }
    
    default <T> Reference2LongFunction<T> composeReference(final Reference2IntFunction<? super T> before) {
        return k -> this.get(before.getInt(k));
    }
}
