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

etlt.condition.CompoundCondition   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 36
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A CompoundCondition.append_condition() 0 7 1
A CompoundCondition.__init__() 0 6 1
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