class ImmutableFeatureDefinition implements FeatureDefinition {

    public static ImmutableFeatureDefinition fromJson(final JsonArray featureDefinitionEntriesAsJsonArray) {
        checkNotNull(featureDefinitionEntriesAsJsonArray, "JSON array containing the FeatureDefinition entries");
        if (featureDefinitionEntriesAsJsonArray.isEmpty()) {
            throw new FeatureDefinitionEmptyException();
        }

        final List<DefinitionIdentifier> identifiersFromJson = featureDefinitionEntriesAsJsonArray.stream()
                .filter(JsonValue::isString)
                .map(JsonValue::asString)
                .map(ImmutableFeatureDefinitionIdentifier::ofParsed)
                .collect(Collectors.toList());

        return new ImmutableFeatureDefinition(identifiersFromJson);
    }

    private  ImmutableFeatureDefinition(final Collection<DefinitionIdentifier> identifiers);

}