@Immutable @PublicApi 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)
Deprecated.
since 4.6, use
EnabledDarkFeatures(java.util.Map) instead. |
EnabledDarkFeatures(Map<FeatureKeyScope,Set<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()
Deprecated.
since 4.6, use
getFeatureKeySet() instead |
com.google.common.collect.ImmutableSet<String> |
getFeatureKeys(com.google.common.base.Predicate<FeatureKeyScope> criteria)
Deprecated.
since 4.6, use
getFeatureKeys(java.util.function.Predicate) instead. |
Set<String> |
getFeatureKeys(Predicate<FeatureKeyScope> criteria)
Returns all enabled feature keys matching the given criteria.
|
Set<String> |
getFeatureKeySet()
Return all enabled feature keys, the set will be immutable.
|
boolean |
isFeatureEnabled(String featureKey)
Check that the given feature is enabled
|
String |
toString() |
public static final EnabledDarkFeatures NONE
@Deprecated public EnabledDarkFeatures(com.google.common.collect.ImmutableMap<FeatureKeyScope,com.google.common.collect.ImmutableSet<String>> enabledFeatures)
EnabledDarkFeatures(java.util.Map) instead.enabledFeatures - a map of enabled featurespublic EnabledDarkFeatures(Map<FeatureKeyScope,Set<String>> enabledFeatures)
enabledFeatures - a map of enabled features@Deprecated public com.google.common.collect.ImmutableSet<String> getFeatureKeys()
getFeatureKeySet() insteadpublic Set<String> getFeatureKeySet()
@Deprecated public com.google.common.collect.ImmutableSet<String> getFeatureKeys(com.google.common.base.Predicate<FeatureKeyScope> criteria)
getFeatureKeys(java.util.function.Predicate) instead.criteria - the filter condition to be applied on the set of enabled featurespublic Set<String> getFeatureKeys(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 © 2024 Atlassian. All rights reserved.