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

io.github.mike10004.nanochamp.server.GuavaShim Maven / Gradle / Ivy

package io.github.mike10004.nanochamp.server;

import javax.annotation.Nullable;

class GuavaShim {

    private GuavaShim() {}

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

    public static void checkState(boolean condition, String message) {
        if (!condition) {
            throw new IllegalStateException(message);
        }
    }

    public static boolean isNullOrEmpty(@Nullable String contentEncoding) {
        return contentEncoding == null || contentEncoding.isEmpty();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy