@classmethod
def equalsMask(cls, obis, ic):
    """Check OBIS codes."""
    ret = False
    number = True
    if obis.find(',') != -1:
        tmp = obis.split(',')
        for it in tmp:
            if it.find('-') != -1:
                if cls.equalsMask(it, ic):
                    return True
            elif int(it) == ic:
                return True
        ret = False
    elif obis.find('-') != -1:
        number = False
        tmp = obis.split('-')
        ret = int(ic) >= int(tmp[0]) and ic <= int(tmp[1])
    elif number:
        if obis == '&':
            return ic in (0, 1, 7)
        ret = int(obis) == ic
    return ret
