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


import com.hadisatrio.optional.function.Consumer;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import java.io.Serializable;
            return value;
        }
        throw new IllegalStateException("Value is absent.");
    }

    /**
     * Return the value if present, otherwise return {@code other}.
     *
     * @param other the value to be returned if there is no value present, may not
     * be null
     * @return the value, if present, otherwise {@code other}
     * @throws IllegalArgumentException if {@code other} is null
     */
    public T or(T other) {
        if (other == null) {
            throw new IllegalArgumentException("null may not be passed as an argument; use orNull() instead.");
        }

        return isPresent() ? value : other;
    }

    /**
     * Return the value if present, otherwise invoke {@code otherSupplier} and return
     * the result of that invocation.
     *
     * @param otherSupplier a {@code Supplier} whose result is returned if no value
     * is present
     * @return the value if present otherwise the result of {@code otherSupplier.get()}
     * @throws IllegalArgumentException if {@code otherSupplier} is null
     */
// Path: src/main/java/com/hadisatrio/optional/function/Consumer.java
// public interface Consumer<T> {
// 
//     void consume(T value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Function.java
// public interface Function {
// 
//     void call();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Supplier.java
// public interface Supplier<T> {
// 
//     T get();
// }


// Path: src/main/java/com/hadisatrio/optional/Optional.java
import com.hadisatrio.optional.function.Consumer;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import java.io.Serializable;

            return value;
        }
        throw new IllegalStateException("Value is absent.");
    }

    /**
     * Return the value if present, otherwise return {@code other}.
     *
     * @param other the value to be returned if there is no value present, may not
     * be null
     * @return the value, if present, otherwise {@code other}
     * @throws IllegalArgumentException if {@code other} is null
     */
    public T or(T other) {
        if (other == null) {
            throw new IllegalArgumentException("null may not be passed as an argument; use orNull() instead.");
        }

        return isPresent() ? value : other;
    }

    /**
     * Return the value if present, otherwise invoke {@code otherSupplier} and return
     * the result of that invocation.
     *
     * @param otherSupplier a {@code Supplier} whose result is returned if no value
     * is present
     * @return the value if present otherwise the result of {@code otherSupplier.get()}
     * @throws IllegalArgumentException if {@code otherSupplier} is null
     */
    public T or(Supplier<T> otherSupplier) {