class Integer: TYPE_DESC = yass.TypeDesc(yass.FIRST_DESC_ID, IntegerHandler()) def __init__(self, value: int) -> None: # note: check if value is really a Java Integer should be implemented here self.value = value def __str__(self) -> str: return str(self.value)
class Expiration: TYPE_DESC = yass.TypeDesc(yass.FIRST_DESC_ID + 1, ExpirationHandler()) def __init__(self, year: int, month: int, day: int) -> None: self.year = year self.month = month self.day = day def __str__(self) -> str: return f"{self.year}-{self.month}-{self.day}"
class Expiration: TYPE_DESC = yass.TypeDesc(yass.FIRST_DESC_ID + 1, ExpirationHandler()) def __init__(self, year, month, day): # type: (int, int, int) -> None self.year = year self.month = month self.day = day def __str__(self): return '%s-%s-%s' % (self.year, self.month, self.day)