public DimensionBinding createFor(List<String> newDimensions) {
        if (newDimensions == null) return this; // Note: Not necessarily null - if no new variants then keep the existing binding
        if (this.dimensions == newDimensions) return this; // Avoid creating a new object if the dimensions are the same

        Map<String,String> context = this.context;
        if (context == null)
            context = this.values.asContext(this.dimensions != null ? this.dimensions : newDimensions);
        return new DimensionBinding(newDimensions, extractDimensionValues(newDimensions, context), context);
    }
Returns a binding for a (possibly) new set of variants. Variants may be null, but not bindings
container-search/src/main/java/com/yahoo/search/query/profile/DimensionBinding.java