@Override
    public void visit(MapChoice mapChoice) {
        List<String> placeholderIds = mapChoice.placeholderIds();
        for (String placeholderId : placeholderIds) {
            MapChoice existingChoice = placeholderIdToChoice.put(placeholderId,mapChoice);
            if (existingChoice != null)
                throw new IllegalArgumentException("placeholder id '" + placeholderId + "' is referenced by both " +
                                                   mapChoice + " and " + existingChoice + ": Only one reference is allowed");
        }
    }
Creates a map from placeholder id to the choice providing its value
for all placeholder values visited.
<p>
This visitor will throw an IllegalArgumentException if the same placeholder id
is referenced by two choices.

@author bratseth
container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java