@ SafeVarargs public static < E > List < E > asList ( E [ ] ... arrs ) { int size = 0 ; for ( E [ ] arr : arrs ) { if ( arr == null ) { throw new IllegalArgumentException ( "Null arrays not allowed" ) ; } size += arr . length ; } List < E > result = new ArrayList <> ( size ) ; addAll ( result , arrs ) ; return result ; }
Returns a newly created random access list with the contents of the provided arrays .