Package com.gooddata.featureflag
Class FeatureFlags
- java.lang.Object
-
- com.gooddata.featureflag.FeatureFlags
-
- All Implemented Interfaces:
Iterable<FeatureFlag>
public class FeatureFlags extends Object implements Iterable<FeatureFlag>
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.web.util.UriTemplateAGGREGATED_FEATURE_FLAGS_TEMPLATEstatic StringAGGREGATED_FEATURE_FLAGS_URI
-
Constructor Summary
Constructors Constructor Description FeatureFlags()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFlag(String name, boolean enabled)Adds the feature flag of given name and given value.booleanequals(Object o)inthashCode()booleanisEnabled(String flagName)Returns true if the feature flag with given name exists and is enabled, false otherwise.Iterator<FeatureFlag>iterator()voidremoveFlag(String flagName)Removes flag of given name.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
AGGREGATED_FEATURE_FLAGS_URI
public static final String AGGREGATED_FEATURE_FLAGS_URI
- See Also:
- Constant Field Values
-
AGGREGATED_FEATURE_FLAGS_TEMPLATE
public static final org.springframework.web.util.UriTemplate AGGREGATED_FEATURE_FLAGS_TEMPLATE
-
-
Method Detail
-
addFlag
public void addFlag(String name, boolean enabled)
Adds the feature flag of given name and given value.- Parameters:
name- feature flag nameenabled- feature flag value (enabled / disabled)
-
removeFlag
public void removeFlag(String flagName)
Removes flag of given name.- Parameters:
flagName- name of the flag to remove
-
iterator
public Iterator<FeatureFlag> iterator()
- Specified by:
iteratorin interfaceIterable<FeatureFlag>
-
isEnabled
public boolean isEnabled(String flagName)
Returns true if the feature flag with given name exists and is enabled, false otherwise.- Parameters:
flagName- the name of feature flag- Returns:
- true if the feature flag with given name exists and is enabled, false otherwise
-
-