Class ExpiryTime


  • public class ExpiryTime
    extends Object
    Positive duration that defines when (relatively to the timestamp) in the future the invoice expires
    • Method Detail

      • hash

        public long hash()
        Checks if two ExpiryTimes contain equal inner contents.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(ExpiryTime b)
        Checks if two ExpiryTimes contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • from_seconds

        public static ExpiryTime from_seconds​(long seconds)
        Construct an `ExpiryTime` from seconds.
      • from_duration

        public static ExpiryTime from_duration​(long duration)
        Construct an `ExpiryTime` from a `Duration`.
      • as_seconds

        public long as_seconds()
        Returns the expiry time in seconds
      • as_duration

        public long as_duration()
        Returns a reference to the underlying `Duration` (=expiry time)