public class Feature<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Feature<T> |
disabled() |
static <T> Feature<T> |
enabled(T value) |
boolean |
equals(Object o) |
T |
get() |
int |
hashCode() |
void |
ifEnabled(Consumer<T> consumer)
If the feature is enabled, apply the consumer to it's associated value
|
boolean |
isEnabled() |
T |
orElse(T defaultValue) |
String |
toString() |
public static <T> Feature<T> disabled()
public static <T> Feature<T> enabled(T value)
value - to be wrapped by the featurepublic T get()
public boolean isEnabled()
public void ifEnabled(Consumer<T> consumer)
consumer - to apply to the value, in case this feature is enabledpublic T orElse(T defaultValue)
defaultValue - in case the feature is enabledCopyright © 2025 MuleSoft, Inc.. All rights reserved.