@classmethod
def decode(cls, val):
    """Creates Integer object from any int-convertible object val.

        >>> Integer[8].decode(0xffff)
        Integer[8](255)
        """
    return cls(int(val))
