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

package com.hypixel.hytale.sneakythrow;

import java.util.function.BiFunction;
import com.hypixel.hytale.sneakythrow.function.ThrowableBiFunction;
import java.util.function.Function;
import com.hypixel.hytale.sneakythrow.function.ThrowableFunction;
import java.util.function.IntConsumer;
import com.hypixel.hytale.sneakythrow.consumer.ThrowableIntConsumer;
import com.hypixel.hytale.function.consumer.TriConsumer;
import com.hypixel.hytale.sneakythrow.consumer.ThrowableTriConsumer;
import java.util.function.BiConsumer;
import com.hypixel.hytale.sneakythrow.consumer.ThrowableBiConsumer;
import java.util.function.Consumer;
import com.hypixel.hytale.sneakythrow.consumer.ThrowableConsumer;
import java.util.function.IntSupplier;
import com.hypixel.hytale.sneakythrow.supplier.ThrowableIntSupplier;
import java.util.function.Supplier;
import com.hypixel.hytale.sneakythrow.supplier.ThrowableSupplier;
import javax.annotation.Nonnull;

public class SneakyThrow
{
    @Nonnull
    public static RuntimeException sneakyThrow(@Nonnull final Throwable t) {
        if (t == null) {
            throw new NullPointerException("t");
        }
        return sneakyThrow0(t);
    }
    
    private static <T extends Throwable> T sneakyThrow0(final Throwable t) throws T, Throwable {
        throw t;
    }
    
    public static <E extends Throwable> Runnable sneakyRunnable(final ThrowableRunnable<E> runnable) {
        return runnable;
    }
    
    public static <T, E extends Throwable> Supplier<T> sneakySupplier(final ThrowableSupplier<T, E> supplier) {
        return supplier;
    }
    
    public static <E extends Throwable> IntSupplier sneakySupplier(final ThrowableIntSupplier<E> supplier) {
        return supplier;
    }
    
    public static <T, E extends Throwable> Consumer<T> sneakyConsumer(final ThrowableConsumer<T, E> consumer) {
        return consumer;
    }
    
    public static <T, U, E extends Throwable> BiConsumer<T, U> sneakyConsumer(final ThrowableBiConsumer<T, U, E> consumer) {
        return consumer;
    }
    
    public static <T, U, V, E extends Throwable> TriConsumer<T, U, V> sneakyConsumer(final ThrowableTriConsumer<T, U, V, E> consumer) {
        return consumer;
    }
    
    public static <E extends Throwable> IntConsumer sneakyIntConsumer(final ThrowableIntConsumer<E> consumer) {
        return consumer;
    }
    
    public static <T, R, E extends Throwable> Function<T, R> sneakyFunction(final ThrowableFunction<T, R, E> function) {
        return function;
    }
    
    public static <T, U, R, E extends Throwable> BiFunction<T, U, R> sneakyFunction(final ThrowableBiFunction<T, U, R, E> function) {
        return function;
    }
}
