public class FeatureFlagsState
extends java.lang.Object
LDClientInterface.allFlagsState(LDUser, FlagsStateOption...)
.
Serializing this object to JSON using Gson will produce the appropriate data structure for bootstrapping the LaunchDarkly JavaScript client.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
EvaluationReason |
getFlagReason(java.lang.String key)
Returns the evaluation reason for an individual feature flag at the time the state was recorded.
|
com.google.gson.JsonElement |
getFlagValue(java.lang.String key)
Returns the value of an individual feature flag at the time the state was recorded.
|
int |
hashCode() |
boolean |
isValid()
Returns true if this object contains a valid snapshot of feature flag state, or false if the
state could not be computed (for instance, because the client was offline or there was no user).
|
java.util.Map<java.lang.String,com.google.gson.JsonElement> |
toValuesMap()
Returns a map of flag keys to flag values.
|
public boolean isValid()
public com.google.gson.JsonElement getFlagValue(java.lang.String key)
key
- the feature flag keypublic EvaluationReason getFlagReason(java.lang.String key)
key
- the feature flag keyEvaluationReason
; null if reasons were not recorded, or if there was no such flagpublic java.util.Map<java.lang.String,com.google.gson.JsonElement> toValuesMap()
Do not use this method if you are passing data to the front end to "bootstrap" the JavaScript client.
Instead, serialize the FeatureFlagsState object to JSON using Gson.toJson()
or Gson.toJsonTree()
.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object