public void accept(boolean allowContent,
                       QueryProfileType type,
                       QueryProfileVisitor visitor,
                       DimensionBinding dimensionBinding) {
        // Visit this
        if (allowContent) {
            String key = visitor.getLocalKey();
            if (key != null) {
                if (type != null)
                    type.unalias(key);

                visitor.acceptValue(key, values().get(key), dimensionBinding, owner, dimensionValues);
                if (visitor.isDone()) return;
            }
            else {
                for (Map.Entry<String, Object> entry : values().entrySet()) {
                    visitor.acceptValue(entry.getKey(), entry.getValue(), dimensionBinding, owner, dimensionValues);
                    if (visitor.isDone()) return;
                }
            }
        }

        // Visit inherited
        for (QueryProfile profile : inherited()) {
            if (visitor.visitInherited()) {
                profile.accept(allowContent, visitor, dimensionBinding.createFor(profile.getDimensions()), owner);
            }
            if (visitor.isDone()) return;
        }
    }
Accepts a visitor to the values of this
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java