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

com.github.davidmoten.aws.lw.client.internal.util.Preconditions Maven / Gradle / Ivy

Go to download

Lightweight client for all AWS services (but still with useful builders and XML parser)

The newest version!
package com.github.davidmoten.aws.lw.client.internal.util;

public final class Preconditions {

    private Preconditions() {
        // prevent instantiation
    }

    public static  T checkNotNull(T t) {
        return checkNotNull(t, "argument cannot be null");
    }

    public static  T checkNotNull(T t, String message) {
        if (t == null) {
            throw new IllegalArgumentException(message);
        }
        return t;
    }

    public static void checkArgument(boolean b, String message) {
        if (!b)
            throw new IllegalArgumentException(message);
    }

    public static void checkArgument(boolean b) {
        if (!b)
            throw new IllegalArgumentException();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy