Package org.togglz.core.util
Class FeatureMap
java.lang.Object
org.togglz.core.util.FeatureMap
This map can be used to check whether features are active. You can use either a Feature or 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 FeatureManager for use in DI containers.
- Author:
- Mauro Talevi, Christian Kaltepoth
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
FeatureMap
public FeatureMap()Constructor that will configure the map to lazily lookup theFeatureManagerfrom theFeatureContext. -
FeatureMap
Constructor that allows to manually set the feature manager to use.
-
-
Method Details
-
get
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Object,Boolean>
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,Boolean>
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-