src/share/classes/com/sun/tools/javac/util/List.java

changeset 580
46cf751559ae
parent 554
9d9f26857129
child 581
f2fdd52e4e87
equal deleted inserted replaced
579:d33b91f360fc 580:46cf751559ae
101 return new List<A>(x1, of(x2, x3)); 101 return new List<A>(x1, of(x2, x3));
102 } 102 }
103 103
104 /** Construct a list consisting of given elements. 104 /** Construct a list consisting of given elements.
105 */ 105 */
106 @SuppressWarnings("varargs")
106 public static <A> List<A> of(A x1, A x2, A x3, A... rest) { 107 public static <A> List<A> of(A x1, A x2, A x3, A... rest) {
107 return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest)))); 108 return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest))));
108 } 109 }
109 110
110 /** 111 /**

mercurial