/** * Creates a memory-, CPU- and cache-efficient immutable list. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> of(T... t) { return flatList_(t, false); }
/** * Creates a memory-, CPU- and cache-efficient immutable list. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> of(T... t) { return flatList_(t, false); }
/** * Creates a memory-, CPU- and cache-efficient comparable immutable list, * always copying the contents. * * <p>The elements are comparable, and so is the returned list. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> copyOf(T... t) { return flatList_(t, true); }
/** * Creates a memory-, CPU- and cache-efficient comparable immutable list, * always copying the contents. * * <p>The elements are comparable, and so is the returned list. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> copyOf(T... t) { return flatList_(t, true); }