1 package com.atlassian.plugins.codegen.modules.common;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6
7
8
9 public class Conditions implements Conditional
10 {
11 public static final String AND = "AND";
12 public static final String OR = "OR";
13
14 private String type;
15 private List<Conditional> conditions;
16
17 public Conditions(String type)
18 {
19 this.type = type;
20 this.conditions = new ArrayList<Conditional>();
21 }
22
23 public List<Conditional> getConditions()
24 {
25 return conditions;
26 }
27
28 public void addCondition(Conditional condition)
29 {
30 conditions.add(condition);
31 }
32
33 public String getType()
34 {
35 return type;
36 }
37
38 public void setType(String type)
39 {
40 this.type = type;
41 }
42
43 public boolean isEmpty()
44 {
45 return conditions.isEmpty();
46 }
47 }