![JAR search and dependency download from the Maven repository](/logo.png)
com.telenav.cactus.maven.util.ThrowingOptional Maven / Gradle / Ivy
package com.telenav.cactus.maven.util;
import com.mastfrog.function.throwing.ThrowingConsumer;
import com.mastfrog.function.throwing.ThrowingFunction;
import com.mastfrog.function.throwing.ThrowingPredicate;
import com.mastfrog.function.throwing.ThrowingRunnable;
import com.mastfrog.function.throwing.ThrowingSupplier;
import static com.mastfrog.util.preconditions.Checks.notNull;
import com.mastfrog.util.preconditions.Exceptions;
import java.util.Optional;
import java.util.function.Supplier;
import java.util.stream.Stream;
/**
* Because optional is unusable with code that routinely does I/O or waits on
* things, without becoming littered with try/catch blocks if you try to use
* functional operations.
*
* @author Tim Boudreau
*/
public final class ThrowingOptional implements Supplier
{
private static final ThrowingOptional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy