Package com.atlassian.sal.api.features
Class EnabledDarkFeatures
java.lang.Object
com.atlassian.sal.api.features.EnabledDarkFeatures
Represents a set of enabled features.
- Since:
- 2.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EnabledDarkFeaturesShorthand in case there are no enabled dark features, or they are disabled -
Constructor Summary
ConstructorsConstructorDescriptionEnabledDarkFeatures(Map<FeatureKeyScope, Set<String>> enabledFeatures) Create an instance of enabled features based on the given map. -
Method Summary
Modifier and TypeMethodDescriptiongetFeatureKeys(Predicate<FeatureKeyScope> criteria) Returns all enabled feature keys matching the given criteria.Return all enabled feature keys, the set will be immutable.booleanisFeatureEnabled(String featureKey) Check that the given feature is enabledtoString()
-
Field Details
-
NONE
Shorthand in case there are no enabled dark features, or they are disabled
-
-
Constructor Details
-
EnabledDarkFeatures
Create an instance of enabled features based on the given map.- Parameters:
enabledFeatures- a map of enabled features- Since:
- 4.6.0
-
-
Method Details
-
getFeatureKeySet
Return all enabled feature keys, the set will be immutable.- Returns:
- all enabled feature keys
- Since:
- 4.6.0
-
getFeatureKeys
Returns all enabled feature keys matching the given criteria. The set returned will be unmodifiable.- Parameters:
criteria- the filter condition to be applied on the set of enabled features- Returns:
- the filtered set of enabled features
- Since:
- 4.6.0
-
isFeatureEnabled
Check that the given feature is enabled- Parameters:
featureKey- the feature key to be checked- Returns:
trueif the given feature key is enabled,falseotherwise
-
toString
-