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

fun.langel.cql.util.ListUtil Maven / Gradle / Ivy

The newest version!
package fun.langel.cql.util;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

/**
 * @author [email protected](GuHan)
 * @since 2022/8/1 17:37
 **/
public class ListUtil {

    private ListUtil() {
    }

    public static boolean isNullOrEmpty(final List v) {
        return v == null || v.isEmpty();
    }

    public static String[] toStringArray(final List v) {
        if (v == null || v.isEmpty()) {
            return new String[]{};
        }
        String[] arr = new String[v.size()];
        return v.toArray(arr);
    }

    public static  LinkedList toLinkedList(Collection collection) {
        return new LinkedList<>(collection);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy