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

com.icthh.xm.commons.config.client.utils.Utils Maven / Gradle / Ivy

There is a newer version: 4.0.18
Show newest version
package com.icthh.xm.commons.config.client.utils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

public final class Utils {
    public static  List nullSafeList(List list) {
        return list == null ? new ArrayList<>() : list;
    }

    public static  Function, List> nullSafeList() {
        return Utils::nullSafeList;
    }

    public static  Map nullSafeMap(Map map) {
        return map == null ? new HashMap<>() : map;
    }

    public static  Function, Map> nullSafeMap() {
        return Utils::nullSafeMap;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy