class ImmutableFeatures implements Features {

    public static ImmutableFeatures of(final Iterable<Feature> features) {
        checkNotNull(features, "initial features");

        final Map<String, Feature> featureMap = new HashMap<>();
        features.forEach(feature -> featureMap.put(feature.getId(), feature));

        return new ImmutableFeatures(featureMap);
    }

    private  ImmutableFeatures(final Map<String, Feature> features);

}