Skip navigation links
A C E F G H M N O P R S T U 

A

accept(T) - Method in interface net.lenni0451.commons.unchecked.function.ThrowingConsumer
Accept the input.
apply(T) - Method in interface net.lenni0451.commons.unchecked.function.ThrowingFunction
Apply the function to the input.
attempt(ThrowingSupplier<T>) - Static method in class net.lenni0451.commons.unchecked.FieldInitializer
Create a FieldInitializer that attempts to get the value from the supplier.

C

cast(Object) - Static method in class net.lenni0451.commons.unchecked.Unchecked
Cast an object to a specific type without a warning.

E

ensure(Supplier<Throwable>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Ensure that the value is not null, otherwise throw the provided exception.

F

fake(Class<T>) - Static method in class net.lenni0451.commons.unchecked.Sneaky
A fake method to declare a checked exception without actually throwing it.
FieldInitializer<T> - Class in net.lenni0451.commons.unchecked
A utility to initialize fields with various strategies.
FieldInitializer() - Constructor for class net.lenni0451.commons.unchecked.FieldInitializer
 
firstOf(ThrowingSupplier<T>...) - Static method in class net.lenni0451.commons.unchecked.FieldInitializer
Create a FieldInitializer that tries multiple suppliers and returns the first non-null value.
If all suppliers throw an exception or return null, an IllegalStateException is thrown.

G

get() - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Get the value from this FieldInitializer.
May return null or throw an exception.
get() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingSupplier
Get the value from the supplier.

H

handleException(Function<Throwable, Throwable>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Handle exceptions thrown by the supplier using the provided exception mapper.

M

map(ThrowingFunction<T, R>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Map the value of this FieldInitializer.

N

net.lenni0451.commons.unchecked - package net.lenni0451.commons.unchecked
 
net.lenni0451.commons.unchecked.function - package net.lenni0451.commons.unchecked.function
 

O

of(T) - Static method in class net.lenni0451.commons.unchecked.FieldInitializer
Create a FieldInitializer with a constant value.
onlyIf(boolean) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Only get the value if the condition is true, otherwise return null.
onlyIf(ThrowingSupplier<Boolean>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Only get the value if the condition supplier returns true, otherwise return null.
or(ThrowingSupplier<T>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Try to get the value from this FieldInitializer, if it is null or throws an exception, try the fallback supplier.
orElse(T) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Get the value from this FieldInitializer, if it is null, return the provided other value.
May also throw exceptions from the supplier.

P

peek(ThrowingConsumer<T>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Peek at the value of this FieldInitializer without modifying it.

R

require(Supplier<Throwable>) - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Get the value from this FieldInitializer, if it is null, throw the provided exception.
May also throw exceptions from the supplier.
run() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingRunnable
Run the runnable.

S

silent() - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Silently catch any exceptions thrown by the supplier and return null instead.
Sneaky - Class in net.lenni0451.commons.unchecked
 
Sneaky() - Constructor for class net.lenni0451.commons.unchecked.Sneaky
 
sneakyThrow(Throwable) - Static method in class net.lenni0451.commons.unchecked.Sneaky
Throw a throwable sneakily without declaring it.

T

ThrowingConsumer<T> - Interface in net.lenni0451.commons.unchecked.function
A consumer that can throw checked exceptions.
ThrowingFunction<T,R> - Interface in net.lenni0451.commons.unchecked.function
A function that can throw checked exceptions.
ThrowingRunnable - Interface in net.lenni0451.commons.unchecked.function
A runnable that can throw checked exceptions.
ThrowingSupplier<T> - Interface in net.lenni0451.commons.unchecked.function
A supplier that can throw checked exceptions.
toConsumer(ThrowingConsumer<T>) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingConsumer
Convert a ThrowingConsumer to a standard Consumer.
toConsumer() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingConsumer
Convert this ThrowingConsumer to a standard Consumer.
toFunction(ThrowingFunction<T, R>) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingFunction
Convert a ThrowingFunction to a standard Function.
toFunction() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingFunction
Convert this ThrowingFunction to a standard Function.
toRunnable(ThrowingRunnable) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingRunnable
Convert a ThrowingRunnable to a standard Runnable.
toRunnable() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingRunnable
Convert this ThrowingRunnable to a standard Runnable.
toSupplier(ThrowingSupplier<T>) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingSupplier
Convert a ThrowingSupplier to a standard Supplier.
toSupplier() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingSupplier
Convert this ThrowingSupplier to a standard Supplier.
tryAccept(T) - Method in interface net.lenni0451.commons.unchecked.function.ThrowingConsumer
Accept the input and sneakily throw any exceptions.
tryApply(T) - Method in interface net.lenni0451.commons.unchecked.function.ThrowingFunction
Apply the function to the input and sneakily throw any exceptions.
tryGet(ThrowingSupplier<T>) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingSupplier
Get the value from the supplier and sneakily throw any exceptions.
tryGet() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingSupplier
Get the value from the supplier and sneakily throw any exceptions.
tryRun(ThrowingRunnable) - Static method in interface net.lenni0451.commons.unchecked.function.ThrowingRunnable
Run the runnable and sneakily throw any exceptions.
tryRun() - Method in interface net.lenni0451.commons.unchecked.function.ThrowingRunnable
Run the runnable and sneakily throw any exceptions.

U

Unchecked - Class in net.lenni0451.commons.unchecked
 
Unchecked() - Constructor for class net.lenni0451.commons.unchecked.Unchecked
 
uncheckedCast() - Method in class net.lenni0451.commons.unchecked.FieldInitializer
Unchecked cast of this FieldInitializer to a different type.
Beware of potential ClassCastExceptions when using this method.
A C E F G H M N O P R S T U 
Skip navigation links