Package com.launchdarkly.sdk.android
Class DataModel.Flag
java.lang.Object
com.launchdarkly.sdk.android.DataModel.Flag
- Enclosing class:
- DataModel
Represents the state of a feature flag evaluation received from LaunchDarkly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DataModel.FlagdeletedItemPlaceholder(String key, int version) booleanstatic DataModel.FlagDeserializes a flag from JSON toDataModel.FlagtoJson()toString()
-
Constructor Details
-
Flag
public Flag(@NonNull String key, @NonNull LDValue value, int version, @Nullable Integer flagVersion, @Nullable Integer variation, boolean trackEvents, boolean trackReason, @Nullable Long debugEventsUntilDate, @Nullable EvaluationReason reason, @Nullable String[] prerequisites) Constructs an instance, specifying all properties.- Parameters:
key- the flag keyvalue- the current valueversion- a value that is incremented with each updateflagVersion- the current flag version for analytics eventsvariation- variation index of the resulttrackEvents- true if full event tracking is enabledtrackReason- true if events must include evaluation reasonsdebugEventsUntilDate- non-null if debugging is enabledreason- evaluation reason of the result, or null if not availableprerequisites- flag keys of prerequisites
-
-
Method Details
-
deletedItemPlaceholder
- Parameters:
key- of the flagversion- of the flag- Returns:
- a placeholder
DataModel.Flagto represent a deleted flag
-
toString
-
equals
-
fromJson
Deserializes a flag from JSON toDataModel.Flag- Parameters:
json- to convert- Returns:
- the
DataModel.Flag - Throws:
SerializationException- if unable to deserialize
-
toJson
- Returns:
- JSON serialization of the flag
-