Package com.flagsmith.flagengine
Class SegmentCondition
java.lang.Object
com.flagsmith.flagengine.SegmentCondition
-
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serialization.SegmentCondition(SegmentCondition source) Copy constructor.SegmentCondition(SegmentConditions operator, String property, Object value) Constructor with all fields. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetValue(com.fasterxml.jackson.databind.JsonNode node) Set JsonNode value.voidSet String value.voidSet List value.withOperator(SegmentConditions operator) Fluent setter for operator.withProperty(String property) Fluent setter for property.Fluent setter for value.Fluent setter for String value.Fluent setter for List value.
-
Constructor Details
-
SegmentCondition
public SegmentCondition()No args constructor for use in serialization. -
SegmentCondition
Copy constructor.- Parameters:
source- the object being copied
-
SegmentCondition
Constructor with all fields.- Parameters:
operator- the segment condition operatorproperty- the property namevalue- the condition value
-
-
Method Details
-
setValue
public void setValue(com.fasterxml.jackson.databind.JsonNode node) Set JsonNode value. Required for engine tests.- Parameters:
node- the JsonNode value.- Throws:
IllegalArgumentException- if value is not a String or List of Strings
-
setValue
Set String value.- Parameters:
value- New String value.
-
setValue
Set List value.- Parameters:
value- New List value.
-
withOperator
Fluent setter for operator.- Parameters:
operator- the segment condition operator- Returns:
- the SegmentCondition instance
-
withProperty
Fluent setter for property.- Parameters:
property- the property name- Returns:
- the SegmentCondition instance
-
withValue
Fluent setter for value.- Parameters:
value- the condition value- Returns:
- the SegmentCondition instance
-
withValue
Fluent setter for String value.- Parameters:
value- the String condition value- Returns:
- the SegmentCondition instance
-
withValue
Fluent setter for List value.- Parameters:
value- the List condition value- Returns:
- the SegmentCondition instance
- Throws:
IllegalArgumentException- if operator is not IN
-