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

com.shedhack.exception.core.Utils Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.shedhack.exception.core;

import java.util.Collection;
import java.util.Map;

/**
 * @author imamchishty
 *
 * Created simple string utils, could use external libraries
 * but I don't want to enforce any tran-dependencies.
 */
public class Utils {

    public static boolean isEmptyOrNull(String value) {
        return value == null || value.length() == 0;
    }

    public static boolean isCollectionNullOrEmpty(Collection collection) {
        return collection == null || collection.isEmpty();
    }

    public static boolean isMapNullOrEmpty(Map map) {
        return map == null || map.isEmpty();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy