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

package it.unimi.dsi.fastutil.bytes;

import java.util.Objects;
import it.unimi.dsi.fastutil.SafeMath;
import java.util.function.IntConsumer;
import java.util.function.Consumer;

@FunctionalInterface
public interface ByteConsumer extends Consumer<Byte>, IntConsumer
{
    void accept(final byte p0);
    
    @Deprecated
    default void accept(final int t) {
        this.accept(SafeMath.safeIntToByte(t));
    }
    
    @Deprecated
    default void accept(final Byte t) {
        this.accept((byte)t);
    }
    
    default ByteConsumer andThen(final ByteConsumer after) {
        Objects.requireNonNull(after);
        return t -> {
            this.accept(t);
            after.accept(t);
        };
    }
    
    default ByteConsumer andThen(final IntConsumer after) {
        ByteConsumer after2;
        if (after instanceof ByteConsumer) {
            after2 = (ByteConsumer)after;
        }
        else {
            Objects.requireNonNull(after);
            after2 = after::accept;
        }
        return this.andThen(after2);
    }
    
    @Deprecated
    default Consumer<Byte> andThen(final Consumer<? super Byte> after) {
        return super.andThen(after);
    }
}
