// Path: src/main/java/com/hadisatrio/optional/function/Function.java
// public interface Function {
// 
//     void call();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortConsumer.java
// public interface ShortConsumer {
// 
//     void consume(short value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortSupplier.java
// public interface ShortSupplier {
// 
//     short get();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Supplier.java
// public interface Supplier<T> {
// 
//     T get();
// }


import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.ShortConsumer;
import com.hadisatrio.optional.function.ShortSupplier;
import com.hadisatrio.optional.function.Supplier;
import java.io.Serializable;
    }

    /**
     * Return the contained value, if present, otherwise throw an exception
     * to be created by the provided supplier.
     *
     * @param <X> Type of the exception to be thrown
     * @param throwableSupplier a {@code Supplier} which will return the exception to
     * be thrown
     * @return the present value
     * @throws X if there is no value present
     * @throws IllegalArgumentException if {@code throwableSupplier} is null
     */
    public <X extends Throwable> short orThrow(Supplier<? extends X> throwableSupplier) throws X {
        if (throwableSupplier == null) {
            throw new IllegalArgumentException("null may not be passed as an argument.");
        }

        if (isPresent()) {
            return value;
        }
        throw throwableSupplier.get();
    }

    /**
     * If a value is present, invoke the specified consumer with the value,
     * otherwise do nothing.
     *
     * @param consumer block to be executed if a value is present
     */
// Path: src/main/java/com/hadisatrio/optional/function/Function.java
// public interface Function {
// 
//     void call();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortConsumer.java
// public interface ShortConsumer {
// 
//     void consume(short value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortSupplier.java
// public interface ShortSupplier {
// 
//     short get();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Supplier.java
// public interface Supplier<T> {
// 
//     T get();
// }


// Path: src/main/java/com/hadisatrio/optional/OptionalShort.java
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.ShortConsumer;
import com.hadisatrio.optional.function.ShortSupplier;
import com.hadisatrio.optional.function.Supplier;
import java.io.Serializable;

    }

    /**
     * Return the contained value, if present, otherwise throw an exception
     * to be created by the provided supplier.
     *
     * @param <X> Type of the exception to be thrown
     * @param throwableSupplier a {@code Supplier} which will return the exception to
     * be thrown
     * @return the present value
     * @throws X if there is no value present
     * @throws IllegalArgumentException if {@code throwableSupplier} is null
     */
    public <X extends Throwable> short orThrow(Supplier<? extends X> throwableSupplier) throws X {
        if (throwableSupplier == null) {
            throw new IllegalArgumentException("null may not be passed as an argument.");
        }

        if (isPresent()) {
            return value;
        }
        throw throwableSupplier.get();
    }

    /**
     * If a value is present, invoke the specified consumer with the value,
     * otherwise do nothing.
     *
     * @param consumer block to be executed if a value is present
     */
    public void ifPresent(ShortConsumer consumer) {