All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dataloader.impl.Assertions Maven / Gradle / Ivy

There is a newer version: 2022-09-12T23-25-35-08559ba
Show newest version
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");
    }

    private static class AssertionException extends IllegalStateException {
        public AssertionException(String message) {
            super(message);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy