Package org.togglz.core.util
Class FeatureMap
- java.lang.Object
-
- org.togglz.core.util.FeatureMap
-
public class FeatureMap extends Object implements Map<Object,Boolean>
This map can be used to check whether features are active. You can use either a
Featureor a feature name as the key for a map lookup. The resulting boolean will indicate if the feature is active or not.The map allows constructor-based injection of the
FeatureManagerfor use in DI containers.- Author:
- Mauro Talevi, Christian Kaltepoth
-
-
Constructor Summary
Constructors Constructor Description FeatureMap()Constructor that will configure the map to lazily lookup theFeatureManagerfrom theFeatureContext.FeatureMap(FeatureManager manager)Constructor that allows to manually set the feature manager to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<Object,Boolean>>entrySet()Booleanget(Object key)booleanisEmpty()Set<Object>keySet()Booleanput(Object key, Boolean value)voidputAll(Map<? extends Object,? extends Boolean> m)Booleanremove(Object key)intsize()Collection<Boolean>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
FeatureMap
public FeatureMap()
Constructor that will configure the map to lazily lookup theFeatureManagerfrom theFeatureContext.
-
FeatureMap
public FeatureMap(FeatureManager manager)
Constructor that allows to manually set the feature manager to use.
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Object,Boolean>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<Object,Boolean>
-
-