public final class Uncheck
extends java.lang.Object
UncheckedIOException instead of IOException.| Modifier and Type | Method and Description |
|---|---|
static <T,U> void |
accept(IOBiConsumer<T,U> consumer,
T t,
U u)
Accepts an IO consumer with the given arguments.
|
static <T> void |
accept(IOConsumer<T> consumer,
T t)
Accepts an IO consumer with the given argument.
|
static <T,U,V> void |
accept(IOTriConsumer<T,U,V> consumer,
T t,
U u,
V v)
Accepts an IO consumer with the given arguments.
|
static <T,U,R> R |
apply(IOBiFunction<T,U,R> function,
T t,
U u)
Applies an IO function with the given arguments.
|
static <T,R> R |
apply(IOFunction<T,R> function,
T t)
Applies an IO function with the given arguments.
|
static <T,U,V,W,R> |
apply(IOQuadFunction<T,U,V,W,R> function,
T t,
U u,
V v,
W w)
Applies an IO quad-function with the given arguments.
|
static <T,U,V,R> R |
apply(IOTriFunction<T,U,V,R> function,
T t,
U u,
V v)
Applies an IO tri-function with the given arguments.
|
static <T> int |
compare(IOComparator<T> comparator,
T t,
T u)
Compares the arguments with the comparator.
|
static <T> T |
get(IOSupplier<T> supplier)
Gets the result from an IO supplier.
|
static void |
run(IORunnable runnable)
Runs an IO runnable.
|
static <T> boolean |
test(IOPredicate<T> predicate,
T t)
Tests an IO predicate.
|
public static <T,U> void accept(IOBiConsumer<T,U> consumer, T t, U u)
T - the first input type.U - the second input type.t - the first input argument.u - the second input argument.consumer - Consumes the value.java.io.UncheckedIOException - if an I/O error occurs.public static <T> void accept(IOConsumer<T> consumer, T t)
T - the input type.t - the input argument.consumer - Consumes the value.java.io.UncheckedIOException - if an I/O error occurs.public static <T,U,V> void accept(IOTriConsumer<T,U,V> consumer, T t, U u, V v)
T - the first input type.U - the second input type.V - the third input type.t - the first input argument.u - the second input argument.v - the third input argument.consumer - Consumes the value.java.io.UncheckedIOException - if an I/O error occurs.public static <T,U,R> R apply(IOBiFunction<T,U,R> function, T t, U u)
T - the first function argument type.U - the second function argument type.R - the return type.function - the function.t - the first function argument.u - the second function argument.java.io.UncheckedIOException - if an I/O error occurs.public static <T,R> R apply(IOFunction<T,R> function, T t)
T - the first function argument type.R - the return type.function - the function.t - the first function argument.java.io.UncheckedIOException - if an I/O error occurs.public static <T,U,V,W,R> R apply(IOQuadFunction<T,U,V,W,R> function, T t, U u, V v, W w)
T - the first function argument type.U - the second function argument type.V - the third function argument type.W - the fourth function argument type.R - the return type.function - the function.t - the first function argument.u - the second function argument.v - the third function argument.w - the fourth function argument.java.io.UncheckedIOException - if an I/O error occurs.public static <T,U,V,R> R apply(IOTriFunction<T,U,V,R> function, T t, U u, V v)
T - the first function argument type.U - the second function argument type.V - the third function argument type.R - the return type.function - the function.t - the first function argument.u - the second function argument.v - the third function argument.java.io.UncheckedIOException - if an I/O error occurs.public static <T> int compare(IOComparator<T> comparator, T t, T u)
T - the first function argument type.comparator - the function.t - the first function argument.u - the second function argument.java.io.UncheckedIOException - if an I/O error occurs.public static <T> T get(IOSupplier<T> supplier)
T - the return type of the operations.supplier - Supplies the return value.java.io.UncheckedIOException - if an I/O error occurs.public static void run(IORunnable runnable)
runnable - The runnable to run.java.io.UncheckedIOException - if an I/O error occurs.public static <T> boolean test(IOPredicate<T> predicate, T t)
T - the type of the input to the predicate.predicate - the predicate.t - the input to the predicate.true if the input argument matches the predicate, otherwise false.Copyright © 2010 - 2023 Adobe. All Rights Reserved