Implement SeriesIntersection.inverse()

Implement SeriesIntersection.inverse() to return the inverse of the
current intersection type
This commit is contained in:
XANTRONIX 2025-03-14 11:00:37 -04:00
parent 00828ce417
commit 933d11ebc7

View file

@ -17,6 +17,14 @@ class SeriesIntersection(enum.Enum):
elif a < b: elif a < b:
return SeriesIntersection.LESSER return SeriesIntersection.LESSER
def inverse(self):
if self is SeriesIntersection.GREATER:
return SeriesIntersection.LESSER
elif self is SeriesIntersection.LESSER:
return SeriesIntersection.GREATER
return self
class Series(dict): class Series(dict):
def __init__(self): def __init__(self):
super().__init__() super().__init__()