/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * <p>The elements need not be comparable, * and the returned list may not implement {@link Comparable}. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> copyOf(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * <p>The elements need not be comparable, * and the returned list may not implement {@link Comparable}. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> copyOf(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ @Deprecated // to be removed before 2.0 public static <T> List<T> copy(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ @Deprecated // to be removed before 2.0 public static <T> List<T> copy(T... t) { return flatListNotComparable(t); }