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 long
as_duration()
Returns a reference to the underlying [`Duration`] (=expiry time)long
as_seconds()
Returns the expiry time in secondsExpiryTime
clone()
Creates a copy of the ExpiryTimeboolean
eq(ExpiryTime b)
Checks if two ExpiryTimes contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
static ExpiryTime
from_duration(long duration)
Construct an `ExpiryTime` from a [`Duration`], dropping the sub-second part.static ExpiryTime
from_seconds(long seconds)
Construct an `ExpiryTime` from seconds.long
hash()
Generates a non-cryptographic 64-bit hash of the ExpiryTime.int
hashCode()
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public ExpiryTime clone()
Creates a copy of the ExpiryTime
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the ExpiryTime.
-
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`], dropping the sub-second part.
-
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)
-
-