Package com.flagsmith.flagengine
Class SegmentRule
java.lang.Object
com.flagsmith.flagengine.SegmentRule
SegmentRule
Represents a rule within a segment for feature flag evaluation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationSegmentRule(SegmentRule source) SegmentRule(SegmentRule.Type type, List<SegmentCondition> conditions, List<SegmentRule> rules) -
Method Summary
Modifier and TypeMethodDescriptionbooleanConditionsgetRules()Sub-rulesgetType()TypeinthashCode()voidsetAdditionalProperty(String name, Object value) voidsetConditions(List<SegmentCondition> conditions) ConditionsvoidsetRules(List<SegmentRule> rules) Sub-rulesvoidsetType(SegmentRule.Type type) TypetoString()withAdditionalProperty(String name, Object value) withConditions(List<SegmentCondition> conditions) withRules(List<SegmentRule> rules) withType(SegmentRule.Type type)
-
Constructor Details
-
SegmentRule
public SegmentRule()No args constructor for use in serialization -
SegmentRule
- Parameters:
source- the object being copied
-
SegmentRule
public SegmentRule(SegmentRule.Type type, List<SegmentCondition> conditions, List<SegmentRule> rules) - Parameters:
type- Type. Segment rule type. Represents a logical quantifier for the conditions and sub-rules.conditions- Conditions. Conditions that must be met for the rule to apply.rules- Sub-rules. Sub-rules nested within the segment rule.
-
-
Method Details
-
getType
TypeSegment rule type. Represents a logical quantifier for the conditions and sub-rules. (Required)
-
setType
TypeSegment rule type. Represents a logical quantifier for the conditions and sub-rules. (Required)
-
withType
-
getConditions
ConditionsConditions that must be met for the rule to apply.
-
setConditions
ConditionsConditions that must be met for the rule to apply.
-
withConditions
-
getRules
Sub-rulesSub-rules nested within the segment rule.
-
setRules
Sub-rulesSub-rules nested within the segment rule.
-
withRules
-
getAdditionalProperties
-
setAdditionalProperty
-
withAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-