public class FeatureFlags extends Object implements Iterable<FeatureFlag>
Modifier and Type | Field and Description |
---|---|
static org.springframework.web.util.UriTemplate |
AGGREGATED_FEATURE_FLAGS_TEMPLATE |
static String |
AGGREGATED_FEATURE_FLAGS_URI |
Constructor and Description |
---|
FeatureFlags() |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(String name,
boolean enabled)
Adds the feature flag of given name and given value.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEnabled(String flagName)
Returns true if the feature flag with given name exists and is enabled, false otherwise.
|
Iterator<FeatureFlag> |
iterator() |
void |
removeFlag(String flagName)
Removes flag of given name.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String AGGREGATED_FEATURE_FLAGS_URI
public static final org.springframework.web.util.UriTemplate AGGREGATED_FEATURE_FLAGS_TEMPLATE
public void addFlag(String name, boolean enabled)
name
- feature flag nameenabled
- feature flag value (enabled / disabled)public void removeFlag(String flagName)
flagName
- name of the flag to removepublic Iterator<FeatureFlag> iterator()
iterator
in interface Iterable<FeatureFlag>
public boolean isEnabled(String flagName)
flagName
- the name of feature flagCopyright © 2016. All Rights Reserved.