Class DataModel.Flag

  • Enclosing class:
    DataModel

    public static final class DataModel.Flag
    extends java.lang.Object
    Represents the state of a feature flag evaluation received from LaunchDarkly.
    • Constructor Summary

      Constructors 
      Constructor Description
      Flag​(java.lang.String key, LDValue value, int version, java.lang.Integer flagVersion, java.lang.Integer variation, boolean trackEvents, boolean trackReason, java.lang.Long debugEventsUntilDate, EvaluationReason reason)
      Constructs an instance, specifying all properties.
    • Constructor Detail

      • Flag

        public Flag​(@NonNull
                    java.lang.String key,
                    @NonNull
                    LDValue value,
                    int version,
                    @Nullable
                    java.lang.Integer flagVersion,
                    @Nullable
                    java.lang.Integer variation,
                    boolean trackEvents,
                    boolean trackReason,
                    @Nullable
                    java.lang.Long debugEventsUntilDate,
                    @Nullable
                    EvaluationReason reason)
        Constructs an instance, specifying all properties.
        Parameters:
        key - the flag key
        value - the current value
        version - a value that is incremented with each update
        flagVersion - the current flag version for analytics events
        variation - variation index of the result
        trackEvents - true if full event tracking is enabled
        trackReason - true if events must include evaluation reasons
        debugEventsUntilDate - non-null if debugging is enabled
        reason - evaluation reason of the result, or null if not available
    • Method Detail

      • deletedItemPlaceholder

        public static DataModel.Flag deletedItemPlaceholder​(@NonNull
                                                            java.lang.String key,
                                                            int version)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toJson

        public java.lang.String toJson()