public class FlagValueChangeEvent extends FlagChangeEvent
FlagValueChangeListener.
This is not an analytics event to be sent to LaunchDarkly; it is a notification to the application.
| Constructor and Description |
|---|
FlagValueChangeEvent(java.lang.String key,
LDValue oldValue,
LDValue newValue)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
LDValue |
getNewValue()
Returns the new value of the flag for the specified user.
|
LDValue |
getOldValue()
Returns the last known value of the flag for the specified user prior to the update.
|
getKeypublic LDValue getOldValue()
Since flag values can be of any JSON data type, this is represented as LDValue. That class
has methods for converting to a primitive Java type such as LDValue.booleanValue().
If the flag did not exist before or could not be evaluated, this will be LDValue.ofNull().
Note that there is no application default value parameter as there is for the variation
methods; it is up to your code to substitute whatever fallback value is appropriate.
public LDValue getNewValue()
Since flag values can be of any JSON data type, this is represented as LDValue. That class
has methods for converting to a primitive Java type such LDValue.booleanValue().
If the flag was deleted or could not be evaluated, this will be LDValue.ofNull().
Note that there is no application default value parameter as there is for the variation
methods; it is up to your code to substitute whatever fallback value is appropriate.