public QueryProfileVariant getVariant(DimensionValues dimensionValues, boolean create) {
        for (QueryProfileVariant profileVariant : variants)
            if (profileVariant.getDimensionValues().equals(dimensionValues))
                return profileVariant;

        // Not found
        if ( ! create) return null;
        QueryProfileVariant variant = new QueryProfileVariant(dimensionValues, owner);
        variants.add(variant);
        return variant;
    }
Returns the query profile variant having exactly the given dimensions, and creates it if create is set and
it is missing

@param  dimensionValues the dimension values
@param  create whether or not to create the variant if missing
@return the profile variant, or null if not found and create is false
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java