Package org.ldk.structs
Class ExpiryTime
- java.lang.Object
-
- org.ldk.structs.ExpiryTime
-
public class ExpiryTime extends Object
Positive duration that defines when (relatively to the timestamp) in the future the invoice expires
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longas_duration()Returns a reference to the underlying `Duration` (=expiry time)longas_seconds()Returns the expiry time in secondsExpiryTimeclone()Creates a copy of the ExpiryTimebooleaneq(ExpiryTime b)Checks if two ExpiryTimes contain equal inner contents.booleanequals(Object o)protected voidfinalize()static ExpiryTimefrom_duration(long duration)Construct an `ExpiryTime` from a `Duration`.static ExpiryTimefrom_seconds(long seconds)Construct an `ExpiryTime` from seconds.longhash()Checks if two ExpiryTimes contain equal inner contents.inthashCode()
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public ExpiryTime clone()
Creates a copy of the ExpiryTime
-
hash
public long hash()
Checks if two ExpiryTimes contain equal inner contents.
-
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)
-
-