Package br.ufsc.labsec.utils
Interface Assertions
public interface Assertions
-
Method Summary
Static Methods Modifier and Type Method Description static <E extends Throwable>
booleancheckArgument(boolean condition, @NotNull Supplier<? extends E> supplier)
static <E extends Throwable>
booleancheckArgument(boolean condition, E exception)
static <T, E extends Throwable>
TcheckNotNull(T reference, @NotNull Supplier<? extends E> supplier)
static <T, E extends Throwable>
TcheckNotNull(T reference, E exception)
-
Method Details
-
checkArgument
@CanIgnoreReturnValue static <E extends Throwable> boolean checkArgument(boolean condition, @NotNull @NotNull Supplier<? extends E> supplier) throws E extends Throwable- Throws:
E extends Throwable
-
checkArgument
@CanIgnoreReturnValue static <E extends Throwable> boolean checkArgument(boolean condition, @NotNull E exception) throws E extends Throwable- Throws:
E extends Throwable
-
checkNotNull
@CanIgnoreReturnValue static <T, E extends Throwable> T checkNotNull(@CheckForNull T reference, @NotNull @NotNull Supplier<? extends E> supplier) throws E extends Throwable- Throws:
E extends Throwable
-
checkNotNull
@CanIgnoreReturnValue static <T, E extends Throwable> T checkNotNull(@CheckForNull T reference, @NotNull E exception) throws E extends Throwable- Throws:
E extends Throwable
-