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

com.jukusoft.i18n.utils.StringUtils Maven / Gradle / Ivy

package com.jukusoft.i18n.utils;

import java.util.Objects;

public class StringUtils {

    protected StringUtils () {
        //
    }

    public static final void requireNotEmpty (String str) {
        requireNotEmpty(str, "string");
    }

    public static final void requireNotEmpty (String str, String name) {
        Objects.requireNonNull(str);

        if (str.isEmpty()) {
            throw new IllegalArgumentException(name + " cannot be empty!");
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy