code: public static List<Map<String, String>> getAllVariants(Map<String, ? extends Collection<String>> variantSets) {
  
  		List<Map<String, String>> variants = new ArrayList<>();
  		if (variantSets != null) {
  			for (Entry<String, Collection<String>> variantEntry : new TreeMap<>(variantSets).entrySet()) {
  				String variantType = variantEntry.getKey();
  				Collection<String> variantList = variantEntry.getValue();
  				if (variants.isEmpty()) {
  					variants = getVariants(null, variantType, variantList);
  				} else {
  
  					List<Map<String, String>> tmpResult = new ArrayList<>();
  					for (Map<String, String> curVariant : variants) {
  						tmpResult.addAll(getVariants(curVariant, variantType, variantList));
  					}
  					variants = tmpResult;
  				}
  			}
  		}
  
  		return variants;
  	}
docs: Returns all variant keys from the map of variant set
  
  @param variantSets
  the map of variant set
  @return all variant keys