class Currency:
    obj_list = []

    def __init__(self, params):
        # Unique ID generated by the system.
        self.curr_id = int(params[0]) if params[0] else None
        # The number of decimal places displayed.
        self.decimal_digit_cnt = int(params[1]) if params[1] else None
        # The symbol used to identify each defined currency.
        self.curr_symbol = params[2].strip()
        # The decimal symbol displayed.
        self.decimal_symbol = params[3].strip()
        # The symbol used to group the numbers.
        self.digit_group_symbol = params[4].strip()
        # The symbol used to display a positive currency.
        self.pos_curr_fmt_type = params[5].strip()
        # The symbol used to display a negative currency.
        self.neg_curr_fmt_type = params[6].strip()
        # The names of all defined currencies.
        self.curr_type = params[7].strip()
        # The identifiers for all currencies defined in Project Management.
        self.curr_short_name = params[8].strip()
        # Currency Group Digit Count
        self.group_digit_cnt = params[9].strip()
        # The current exchange rate between the selected currency and the base currency.
        self.base_exch_rate = params[10].strip()

        Currency.obj_list.append(self)

    def get_id(self):
        return self.curr_id


    @classmethod
    def find_by_id(cls, id):
        obj = list(filter(lambda x: x.curr_id == id, cls.obj_list))
        if obj:
            return obj[0]
        return obj

    def __repr__(self):
        return self.curr_symbol + ' ' + self.curr_type