@Immutable public final class EnabledDarkFeatures extends Object
Modifier and Type | Field and Description |
---|---|
static EnabledDarkFeatures |
NONE
Shorthand in case there are no enabled dark features or they are disabled
|
Constructor and Description |
---|
EnabledDarkFeatures(com.google.common.collect.ImmutableMap<FeatureKeyScope,com.google.common.collect.ImmutableSet<String>> enabledFeatures)
Create an instance of enabled features based on the given map.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<String> |
getFeatureKeys()
Return all enabled feature keys.
|
com.google.common.collect.ImmutableSet<String> |
getFeatureKeys(com.google.common.base.Predicate<FeatureKeyScope> criteria)
Returns all enabled feature keys matching the given criteria.
|
boolean |
isFeatureEnabled(String featureKey)
Check that the given feature is enabled
|
String |
toString() |
public static final EnabledDarkFeatures NONE
public EnabledDarkFeatures(com.google.common.collect.ImmutableMap<FeatureKeyScope,com.google.common.collect.ImmutableSet<String>> enabledFeatures)
enabledFeatures
- a map of enabled featurespublic com.google.common.collect.ImmutableSet<String> getFeatureKeys()
public com.google.common.collect.ImmutableSet<String> getFeatureKeys(com.google.common.base.Predicate<FeatureKeyScope> criteria)
criteria
- the filter condition to be applied on the set of enabled featurespublic boolean isFeatureEnabled(String featureKey)
featureKey
- the feature key to be checkedtrue
if the given feature key is enabled, false
otherwiseCopyright © 2015 Atlassian. All rights reserved.