private static List < Map < String , String > > getVariants ( Map < String , String > curVariant , String variantType , Collection < String > variantList ) { List < Map < String , String > > variants = new ArrayList <> ( ) ; for ( String variant : variantList ) { Map < String , String > map = new HashMap <> ( ) ; if ( curVariant != null ) { map . putAll ( curVariant ) ; } map . put ( variantType , variant ) ; variants . add ( map ) ; } return variants ; }
Returns the list of variant maps which are initialized with the current map values and each element of the list contains an element of the variant list with the variant type as key