Total Complexity | 2 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | """ |
||
2 | ETLT |
||
3 | |||
4 | Copyright 2016 Set Based IT Consultancy |
||
5 | |||
6 | Licence MIT |
||
7 | """ |
||
8 | from etlt.condition.Condition import Condition |
||
9 | |||
10 | |||
11 | class CompoundCondition(Condition): |
||
12 | """ |
||
13 | Abstract parent class for conditions with one or more child conditions. |
||
14 | """ |
||
15 | |||
16 | # ------------------------------------------------------------------------------------------------------------------ |
||
17 | def __init__(self): |
||
18 | """ |
||
19 | Object constructor. |
||
20 | """ |
||
21 | self._conditions = [] |
||
22 | """ |
||
23 | The list of conditions of this compound condition. |
||
24 | |||
25 | :type: list[gdwh.map.Condition.Condition] |
||
26 | """ |
||
27 | |||
28 | # ------------------------------------------------------------------------------------------------------------------ |
||
29 | def append_condition(self, condition): |
||
30 | """ |
||
31 | Appends a child condition to the list of conditions of this compound condition. |
||
32 | |||
33 | :param gdwh.map.Condition.Condition condition: The child conditions. |
||
34 | """ |
||
35 | self._conditions.append(condition) |
||
36 | |||
38 |