private static DimensionValues extractDimensionValues(List<String> dimensions, Map<String,String> context) {
        String[] dimensionValues = new String[dimensions.size()];
        if (context == null || context.size() == 0) return DimensionValues.createFrom(dimensionValues);
        for (int i = 0; i < dimensions.size(); i++)
            dimensionValues[i] = context.get(dimensions.get(i));
        return DimensionValues.createFrom(dimensionValues);
    }
Returns an array of the dimension values corresponding to the dimensions of this from the given context,
in the corresponding order. The array is always of the same length as the number of dimensions.
Dimensions which are not set in this context get a null value.
container-search/src/main/java/com/yahoo/search/query/profile/DimensionBinding.java