org.dataloader.impl.Assertions Maven / Gradle / Ivy
package org.dataloader.impl;
import java.util.Objects;
public class Assertions {
public static void assertState(boolean state, String message) {
if (!state) {
throw new AssertionException(message);
}
}
public static T nonNull(T t) {
return Objects.requireNonNull(t, "nonNull object required");
}
public static T nonNull(T t, String message) {
return Objects.requireNonNull(t, message);
}
private static class AssertionException extends IllegalStateException {
public AssertionException(String message) {
super(message);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy