    AnnotationDefinitionList(Collection<AnnotationDefinition> definitions, boolean addIdentifierToList) {
        if (definitions == null) {
            throw new IllegalArgumentException("Argument definitions was null.");
        }
        if (addIdentifierToList) {
            names.add(IdentifierCriterionWrapper.IDENTIFIER_FIELD_NAME);
            nameToDefinitionMap.put(IdentifierCriterionWrapper.IDENTIFIER_FIELD_NAME, null);
        }
        for (AnnotationDefinition definition : definitions) {
            if (!AnnotationTypeEnum.DATE.getValue().equalsIgnoreCase(definition.getType())) {
                noDateNames.add(definition.getDisplayName());
            }
            names.add(definition.getDisplayName());
            nameToDefinitionMap.put(definition.getDisplayName(), definition);
            Cai2Util.loadCollection(definition.getPermissibleValueCollection());
        }
        Collections.sort(names);
        Collections.sort(noDateNames);
    }

    AnnotationDefinitionList(Collection<AnnotationDefinition> definitions, boolean addIdentifierToList) {
        if (definitions == null) {
            throw new IllegalArgumentException("Argument definitions was null.");
        }
        if (addIdentifierToList) {
            names.add(IdentifierCriterionWrapper.IDENTIFIER_FIELD_NAME);
            noDateNames.add(IdentifierCriterionWrapper.IDENTIFIER_FIELD_NAME);
            nameToDefinitionMap.put(IdentifierCriterionWrapper.IDENTIFIER_FIELD_NAME, null);
        }
        for (AnnotationDefinition definition : definitions) {
            if (!AnnotationTypeEnum.DATE.getValue().equalsIgnoreCase(definition.getType())) {
                noDateNames.add(definition.getDisplayName());
            }
            names.add(definition.getDisplayName());
            nameToDefinitionMap.put(definition.getDisplayName(), definition);
            Cai2Util.loadCollection(definition.getPermissibleValueCollection());
        }
        Collections.sort(names);
        Collections.sort(noDateNames);
    }
