@ SafeVarargs public static < T > List < T > buildListOfAtLeastOne ( T first , T ... more ) { if ( first == null ) { throw new IllegalArgumentException ( "First example is null." ) ; } List < T > result = new ArrayList <> ( ) ; result . add ( first ) ; addArrayElementsToList ( result , more ) ; return result ; }
Builds a list with at least one example .