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 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.
| Constructor and Description |
|---|
FeatureMap()
Constructor that will configure the map to lazily lookup the
FeatureManager from the FeatureContext. |
FeatureMap(FeatureManager manager)
Constructor that allows to manually set the feature manager to use.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<Object,Boolean>> |
entrySet() |
Boolean |
get(Object key) |
boolean |
isEmpty() |
Set<Object> |
keySet() |
Boolean |
put(Object key,
Boolean value) |
void |
putAll(Map<? extends Object,? extends Boolean> m) |
Boolean |
remove(Object key) |
int |
size() |
Collection<Boolean> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic FeatureMap()
FeatureManager from the FeatureContext.public FeatureMap(FeatureManager manager)
public boolean containsKey(Object key)
containsKey in interface Map<Object,Boolean>public boolean containsValue(Object value)
containsValue in interface Map<Object,Boolean>Copyright © 2018. All Rights Reserved.