class ImmutableFeatures implements Features {

    @Override
    public Features setProperties(final String featureId, final FeatureProperties properties) {
        checkNotNull(properties, "properties to be set");

        Feature feature = getFeatureOrNull(featureId);
        if (null != feature) {
            feature = feature.setProperties(properties);
        } else {
            feature = ThingsModelFactory.newFeature(featureId, properties);
        }
        return setFeature(feature);
    }

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

}