Package com.flagsmith.flagengine
Class FeatureValue
java.lang.Object
com.flagsmith.flagengine.FeatureValue
FeatureValue
Represents a multivariate value for a feature flag.
-
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationFeatureValue(FeatureValue source) FeatureValue(Object value, Double weight, Double priority) -
Method Summary
Modifier and TypeMethodDescriptionbooleanVariantPrioritygetValue()ValueWeightinthashCode()voidsetAdditionalProperty(String name, Object value) voidsetPriority(Double priority) VariantPriorityvoidValuevoidWeighttoString()withAdditionalProperty(String name, Object value) withPriority(Double priority) withWeight(Double weight)
-
Constructor Details
-
FeatureValue
public FeatureValue()No args constructor for use in serialization -
FeatureValue
- Parameters:
source- the object being copied
-
FeatureValue
- Parameters:
value- Value. The value of the feature.weight- Weight. The weight of the feature value variant, as a percentage number (i.e. 100.0).priority- VariantPriority. Priority of the feature flag variant. Lower values indicate a higher priority when multiple variants apply to the same context key.
-
-
Method Details
-
getValue
ValueThe value of the feature. (Required)
-
setValue
ValueThe value of the feature. (Required)
-
withValue
-
getWeight
WeightThe weight of the feature value variant, as a percentage number (i.e. 100.0). (Required)
-
setWeight
WeightThe weight of the feature value variant, as a percentage number (i.e. 100.0). (Required)
-
withWeight
-
getPriority
VariantPriorityPriority of the feature flag variant. Lower values indicate a higher priority when multiple variants apply to the same context key. (Required)
-
setPriority
VariantPriorityPriority of the feature flag variant. Lower values indicate a higher priority when multiple variants apply to the same context key. (Required)
-
withPriority
-
getAdditionalProperties
-
setAdditionalProperty
-
withAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-