package com.github.lothar.security.acl;

import java.util.HashMap;
import java.util.Map;

public class SimpleAclStrategy implements AclStrategy {

  private Map<AclFeatureType<?>, Object> features = new HashMap<>();

  public <Feature> void register(AclFeatureType<Feature> featureType, Feature feature) {
    features.put(featureType, feature);
  }

  @SuppressWarnings("unchecked")
  public <Feature> Feature featureFor(AclFeatureType<Feature> featureType) {
    return (Feature) features.get(featureType);
  }

}

@@ -212,32 +212,51 @@
 %3E();%0A%0A  public %3C
+Feature, F extends 
 Feature%3E void re
@@ -300,22 +300,16 @@
 eType, F
-eature
  feature
@@ -357,16 +357,129 @@
 );%0A  %7D%0A%0A
+  public %3CFeature%3E void unregister(AclFeatureType%3CFeature%3E featureType) %7B%0A    features.remove(featureType);%0A  %7D%0A%0A
   @Suppr

support for feature subclasses