Passed
Branch master (17b603)
by P.R.
01:31
created

CompoundCondition.append_condition()   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 7
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 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
37
# ----------------------------------------------------------------------------------------------------------------------
38