Skip to content

Commit 73fa6e2

Browse files
author
jianggang
authored
Feat support segment (#6)
* feat: support segment
1 parent ed2451d commit 73fa6e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/featureprobe/sdk/server/model/SegmentRule.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ public class SegmentRule {
1111

1212
private List<Condition> conditions;
1313

14+
public SegmentRule(){}
15+
16+
public SegmentRule(List<Condition> conditions) {
17+
this.conditions = conditions;
18+
}
19+
1420
public HitResult hit(FPUser user, Map<String, Segment> segments) {
1521
for (Condition condition : conditions) {
1622
if (condition.getType() != ConditionType.SEGMENT && !user.containAttr(condition.getSubject())) {

0 commit comments

Comments
 (0)