Java List from listOf(T... values)

Here you can find the source of listOf(T... values)

Description

list Of

License

Apache License

Declaration

@SafeVarargs
    public static <T> List<T> listOf(T... values) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.*;

import static java.util.Collections.*;

public class Main {
    @SafeVarargs
    public static <T> List<T> listOf(T... values) {
        return unmodifiableList(Arrays.asList(values));
    }// w  w  w . jav  a  2  s .  co  m
}

Related

  1. listOf(String type)
  2. listOf(T value, int size)
  3. listOf(T... args)
  4. listOf(T... elements)
  5. listOf(T... elems)
  6. listOfArrays(T[]... values)
  7. listOfExceptionsAsString(List exs)
  8. listOfIntegers2ArrayOfInts(List xs)
  9. listOfItems(List items, String separator, String finalConjunction)