@@ -1102,6 +1102,7 @@ public int size() {
11021102 return size (iterable );
11031103 }
11041104
1105+ @ SuppressWarnings ("unchecked" )
11051106 public static <E > int size (final E ... array ) {
11061107 return array .length ;
11071108 }
@@ -1157,6 +1158,7 @@ public static <E> E first(final Iterable<E> iterable) {
11571158 return iterable .iterator ().next ();
11581159 }
11591160
1161+ @ SuppressWarnings ("unchecked" )
11601162 public static <E > E first (final E ... array ) {
11611163 return array [0 ];
11621164 }
@@ -1212,6 +1214,7 @@ public static <E> E head(final Iterable<E> iterable) {
12121214 return first (iterable );
12131215 }
12141216
1217+ @ SuppressWarnings ("unchecked" )
12151218 public static <E > E head (final E ... array ) {
12161219 return first (array );
12171220 }
@@ -1239,6 +1242,7 @@ public static <E> List<E> initial(final List<E> list, final int n) {
12391242 return list .subList (0 , Math .max (0 , list .size () - n ));
12401243 }
12411244
1245+ @ SuppressWarnings ("unchecked" )
12421246 public static <E > E [] initial (final E ... array ) {
12431247 return initial (array , 1 );
12441248 }
@@ -1255,6 +1259,7 @@ public List<T> initial(final int n) {
12551259 return initial ((List <T >) iterable , n );
12561260 }
12571261
1262+ @ SuppressWarnings ("unchecked" )
12581263 public static <E > E last (final E ... array ) {
12591264 return array [array .length - 1 ];
12601265 }
@@ -1315,6 +1320,7 @@ public static <E> List<E> rest(final List<E> list, int n) {
13151320 return list .subList (Math .min (n , list .size ()), list .size ());
13161321 }
13171322
1323+ @ SuppressWarnings ("unchecked" )
13181324 public static <E > E [] rest (final E ... array ) {
13191325 return rest (array , 1 );
13201326 }
@@ -1340,6 +1346,7 @@ public static <E> List<E> tail(final List<E> list, final int n) {
13401346 return rest (list , n );
13411347 }
13421348
1349+ @ SuppressWarnings ("unchecked" )
13431350 public static <E > E [] tail (final E ... array ) {
13441351 return rest (array );
13451352 }
@@ -1364,6 +1371,7 @@ public static <E> List<E> drop(final List<E> list, final int n) {
13641371 return rest (list , n );
13651372 }
13661373
1374+ @ SuppressWarnings ("unchecked" )
13671375 public static <E > E [] drop (final E ... array ) {
13681376 return rest (array );
13691377 }
@@ -1449,6 +1457,7 @@ public List<T> flatten(final boolean shallow) {
14491457 /*
14501458 * Documented, #without
14511459 */
1460+ @ SuppressWarnings ("unchecked" )
14521461 public static <E > List <E > without (final List <E > list , E ... values ) {
14531462 final List <E > valuesList = Arrays .asList (values );
14541463 return filter (list , new Predicate <E >() {
@@ -1494,6 +1503,7 @@ public static <E> List<E> distinct(final List<E> list) {
14941503 return uniq (list );
14951504 }
14961505
1506+ @ SuppressWarnings ("unchecked" )
14971507 public static <E > E [] distinct (final E ... array ) {
14981508 return uniq (array );
14991509 }
@@ -1509,6 +1519,7 @@ public static <K, E> E[] distinctBy(final E[] array, final Function<E, K> func)
15091519 /*
15101520 * Documented, #union
15111521 */
1522+ @ SuppressWarnings ("unchecked" )
15121523 public static <E > List <E > union (final List <E > list , final List <E > ... lists ) {
15131524 final Set <E > union = newLinkedHashSet ();
15141525 union .addAll (list );
@@ -1518,6 +1529,7 @@ public static <E> List<E> union(final List<E> list, final List<E> ... lists) {
15181529 return newArrayList (union );
15191530 }
15201531
1532+ @ SuppressWarnings ("unchecked" )
15211533 public List <T > unionWith (final List <T > ... lists ) {
15221534 return union (newArrayList (iterable ), lists );
15231535 }
@@ -1544,6 +1556,7 @@ public static <E> List<E> intersection(final List<E> list1, final List<E> list2)
15441556 return result ;
15451557 }
15461558
1559+ @ SuppressWarnings ("unchecked" )
15471560 public static <E > List <E > intersection (final List <E > list , final List <E > ... lists ) {
15481561 final Deque <List <E >> stack = new ArrayDeque <List <E >>();
15491562 stack .push (list );
@@ -1553,6 +1566,7 @@ public static <E> List<E> intersection(final List<E> list, final List<E> ... lis
15531566 return stack .peek ();
15541567 }
15551568
1569+ @ SuppressWarnings ("unchecked" )
15561570 public List <T > intersectionWith (final List <T > ... lists ) {
15571571 return intersection (newArrayList (iterable ), lists );
15581572 }
@@ -1580,6 +1594,7 @@ public static <E> List<E> difference(final List<E> list1, final List<E> list2) {
15801594 return result ;
15811595 }
15821596
1597+ @ SuppressWarnings ("unchecked" )
15831598 public static <E > List <E > difference (final List <E > list , final List <E > ... lists ) {
15841599 final Deque <List <E >> stack = new ArrayDeque <List <E >>();
15851600 stack .push (list );
@@ -1589,6 +1604,7 @@ public static <E> List<E> difference(final List<E> list, final List<E> ... lists
15891604 return stack .peek ();
15901605 }
15911606
1607+ @ SuppressWarnings ("unchecked" )
15921608 public List <T > differenceWith (final List <T > ... lists ) {
15931609 return difference (newArrayList (iterable ), lists );
15941610 }
@@ -1606,6 +1622,7 @@ public static <E> E[] difference(final E[] ... arrays) {
16061622 /*
16071623 * Documented, #zip
16081624 */
1625+ @ SuppressWarnings ("unchecked" )
16091626 public static <T > List <List <T >> zip (final List <T > ... lists ) {
16101627 final List <List <T >> zipped = newArrayList ();
16111628 each (Arrays .asList (lists ), new Consumer <List <T >>() {
@@ -1625,6 +1642,7 @@ public void accept(final List<T> list) {
16251642 return zipped ;
16261643 }
16271644
1645+ @ SuppressWarnings ("unchecked" )
16281646 public static <T > List <List <T >> unzip (final List <T > ... lists ) {
16291647 final List <List <T >> unzipped = newArrayList ();
16301648 for (int index = 0 ; index < lists [0 ].size (); index += 1 ) {
@@ -2078,6 +2096,7 @@ public boolean test(final E item) {
20782096 /*
20792097 * Documented, #compose
20802098 */
2099+ @ SuppressWarnings ("unchecked" )
20812100 public static <T > Function <T , T > compose (final Function <T , T > ... func ) {
20822101 return new Function <T , T >() {
20832102 public T apply (final T arg ) {
@@ -2223,6 +2242,7 @@ public static List<String> methods(final Object object) {
22232242 /*
22242243 * Documented, #extend
22252244 */
2245+ @ SuppressWarnings ("unchecked" )
22262246 public static <K , V > Map <K , V > extend (final Map <K , V > destination , final Map <K , V > ... sources ) {
22272247 final Map <K , V > result = newLinkedHashMap ();
22282248 for (final Map .Entry <K , V > entry : destination .entrySet ()) {
@@ -2356,6 +2376,7 @@ public static Object clone(final Object obj) {
23562376 throw new IllegalArgumentException ("Cannot clone object" );
23572377 }
23582378
2379+ @ SuppressWarnings ("unchecked" )
23592380 public static <E > E [] clone (final E ... iterable ) {
23602381 return Arrays .copyOf (iterable , iterable .length );
23612382 }
@@ -2648,6 +2669,7 @@ public static <T> Chain<T> chain(final Iterable<T> iterable, int size) {
26482669 return new U .Chain <T >(newArrayList (iterable , size ));
26492670 }
26502671
2672+ @ SuppressWarnings ("unchecked" )
26512673 public static <T > Chain <T > chain (final T ... array ) {
26522674 return new U .Chain <T >(Arrays .asList (array ));
26532675 }
@@ -2935,14 +2957,17 @@ public <F> Chain<F> distinctBy(final Function<T, F> func) {
29352957 return new Chain <F >(U .newArrayList ((Iterable <F >) U .uniq (list , func )));
29362958 }
29372959
2960+ @ SuppressWarnings ("unchecked" )
29382961 public Chain <T > union (final List <T > ... lists ) {
29392962 return new Chain <T >(U .union (list , lists ));
29402963 }
29412964
2965+ @ SuppressWarnings ("unchecked" )
29422966 public Chain <T > intersection (final List <T > ... lists ) {
29432967 return new Chain <T >(U .intersection (list , lists ));
29442968 }
29452969
2970+ @ SuppressWarnings ("unchecked" )
29462971 public Chain <T > difference (final List <T > ... lists ) {
29472972 return new Chain <T >(U .difference (list , lists ));
29482973 }
@@ -2987,6 +3012,7 @@ public Chain<T> interposeByList(final Iterable<T> interIter) {
29873012 return new Chain <T >(U .interposeByList (value (), interIter ));
29883013 }
29893014
3015+ @ SuppressWarnings ("unchecked" )
29903016 public Chain <T > concat (final List <T > ... lists ) {
29913017 return new Chain <T >(U .concat (list , lists ));
29923018 }
@@ -3019,6 +3045,7 @@ public Chain<String> join(final String separator) {
30193045 return new Chain <String >(U .join (list , separator ));
30203046 }
30213047
3048+ @ SuppressWarnings ("unchecked" )
30223049 public Chain <T > push (final T ... values ) {
30233050 return new Chain <T >(U .push (value (), values ));
30243051 }
@@ -3031,6 +3058,7 @@ public Chain<Tuple<T, List<T>>> shift() {
30313058 return new Chain <Tuple <T , List <T >>>(U .shift (value ()));
30323059 }
30333060
3061+ @ SuppressWarnings ("unchecked" )
30343062 public Chain <T > unshift (final T ... values ) {
30353063 return new Chain <T >(U .unshift (value (), values ));
30363064 }
@@ -3096,6 +3124,7 @@ public static <T extends Comparable<T>> List<T> sort(final Iterable<T> iterable)
30963124 return localList ;
30973125 }
30983126
3127+ @ SuppressWarnings ("unchecked" )
30993128 public static <T extends Comparable <T >> T [] sort (final T ... array ) {
31003129 final T [] localArray = array .clone ();
31013130 Arrays .sort (localArray );
@@ -3143,6 +3172,7 @@ public String join() {
31433172 return join (iterable );
31443173 }
31453174
3175+ @ SuppressWarnings ("unchecked" )
31463176 public static <T > List <T > push (final List <T > list , final T ... values ) {
31473177 final List <T > result = newArrayList (list );
31483178 for (T value : values ) {
@@ -3151,6 +3181,7 @@ public static <T> List<T> push(final List<T> list, final T ... values) {
31513181 return result ;
31523182 }
31533183
3184+ @ SuppressWarnings ("unchecked" )
31543185 public List <T > push (final T ... values ) {
31553186 return push ((List <T >) getIterable (), values );
31563187 }
@@ -3163,6 +3194,7 @@ public Tuple<T, List<T>> pop() {
31633194 return pop ((List <T >) getIterable ());
31643195 }
31653196
3197+ @ SuppressWarnings ("unchecked" )
31663198 public static <T > List <T > unshift (final List <T > list , final T ... values ) {
31673199 final List <T > result = newArrayList (list );
31683200 int index = 0 ;
@@ -3173,6 +3205,7 @@ public static <T> List<T> unshift(final List<T> list, final T ... values) {
31733205 return result ;
31743206 }
31753207
3208+ @ SuppressWarnings ("unchecked" )
31763209 public List <T > unshift (final T ... values ) {
31773210 return unshift ((List <T >) getIterable (), values );
31783211 }
@@ -3185,6 +3218,7 @@ public Tuple<T, List<T>> shift() {
31853218 return shift ((List <T >) getIterable ());
31863219 }
31873220
3221+ @ SuppressWarnings ("unchecked" )
31883222 public static <T > T [] concat (final T [] first , final T [] ... other ) {
31893223 int length = 0 ;
31903224 for (T [] otherItem : other ) {
@@ -3202,6 +3236,7 @@ public static <T> T[] concat(final T[] first, final T[] ... other) {
32023236 /*
32033237 * Documented, #concat
32043238 */
3239+ @ SuppressWarnings ("unchecked" )
32053240 public static <T > List <T > concat (final Iterable <T > first , final Iterable <T > ... other ) {
32063241 List <T > list = newArrayList (first );
32073242 for (Iterable <T > iter : other ) {
@@ -3210,6 +3245,7 @@ public static <T> List<T> concat(final Iterable<T> first, final Iterable<T> ...
32103245 return list ;
32113246 }
32123247
3248+ @ SuppressWarnings ("unchecked" )
32133249 public List <T > concatWith (final Iterable <T > ... other ) {
32143250 return concat (iterable , other );
32153251 }
@@ -3339,6 +3375,7 @@ public static <T> List<T> reverse(final Iterable<T> iterable) {
33393375 return result ;
33403376 }
33413377
3378+ @ SuppressWarnings ("unchecked" )
33423379 public static <T > T [] reverse (final T ... array ) {
33433380 T temp ;
33443381 final T [] newArray = array .clone ();
@@ -3568,6 +3605,7 @@ protected static <K, E> Map<K, E> newLinkedHashMap() {
35683605 return new LinkedHashMap <K , E >();
35693606 }
35703607
3608+ @ SuppressWarnings ("unchecked" )
35713609 public static <T > Predicate <T > and (
35723610 final Predicate <? super T > pred1 ,
35733611 final Predicate <? super T > pred2 ,
@@ -3592,6 +3630,7 @@ public boolean test(T value) {
35923630 };
35933631 }
35943632
3633+ @ SuppressWarnings ("unchecked" )
35953634 public static <T > Predicate <T > or (
35963635 final Predicate <? super T > pred1 ,
35973636 final Predicate <? super T > pred2 ,
0 commit comments