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

net.dongliu.commons.lang.Lists Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package net.dongliu.commons.lang;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * utils method for list
 *
 * @author Dong Liu
 */
public class Lists {

    /**
     * get list
     */
    public static  List of(T... t) {
        return (List) Arrays.asList(t);
    }

    /**
     * get immutable list
     */
    @SuppressWarnings("all")
    public static  List immutableOf(T... t) {
        return Collections.unmodifiableList(Arrays.asList(t));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy