Package org.stellar.sdk
Class TimeBounds
java.lang.Object
org.stellar.sdk.TimeBounds
TimeBounds represents the time interval that a transaction is valid.
The UNIX timestamp (in seconds), determined by ledger time, of a lower and upper bound of when this transaction will be valid. If a transaction is submitted too early or too late, it will fail to make it into the transaction set.
- See Also:
-
Constructor Summary
ConstructorDescriptionTimeBounds
(long minTime, long maxTime) TimeBounds
(BigInteger minTime, BigInteger maxTime) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static TimeBounds
expiresAfter
(long timeout) A factory method that sets maxTime to the specified second from now.static TimeBounds
fromXdr
(TimeBounds timeBounds) Construct a newTimeBounds
object from aTimeBounds
XDR object.the UNIX timestamp (in seconds)the UNIX timestamp (in seconds)int
hashCode()
toString()
toXdr()
-
Constructor Details
-
TimeBounds
- Parameters:
minTime
- 64-bit Unix timestampmaxTime
- 64-bit Unix timestamp
-
TimeBounds
public TimeBounds(long minTime, long maxTime) - Parameters:
minTime
- 64-bit Unix timestampmaxTime
- 64-bit Unix timestamp
-
-
Method Details
-
expiresAfter
A factory method that sets maxTime to the specified second from now.- Parameters:
timeout
- Timeout in seconds.- Returns:
- TimeBounds
-
fromXdr
Construct a newTimeBounds
object from aTimeBounds
XDR object.- Parameters:
timeBounds
-TimeBounds
XDR object- Returns:
TimeBounds
object
-
toXdr
- Returns:
TimeBounds
XDR object
-
getMinTime
the UNIX timestamp (in seconds) -
getMaxTime
the UNIX timestamp (in seconds) -
equals
-
hashCode
public int hashCode() -
toString
-