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
ConstructorsConstructorDescriptionTimeBounds(long minTime, long maxTime) TimeBounds(BigInteger minTime, BigInteger maxTime) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TimeBoundsexpiresAfter(long timeout) A factory method that sets maxTime to the specified second from now.static TimeBoundsfromXdr(TimeBounds timeBounds) Construct a newTimeBoundsobject from aTimeBoundsXDR object.the UNIX timestamp (in seconds)the UNIX timestamp (in seconds)inthashCode()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 newTimeBoundsobject from aTimeBoundsXDR object.- Parameters:
timeBounds-TimeBoundsXDR object- Returns:
TimeBoundsobject
-
toXdr
- Returns:
TimeBoundsXDR object
-
getMinTime
the UNIX timestamp (in seconds) -
getMaxTime
the UNIX timestamp (in seconds) -
equals
-
hashCode
public int hashCode() -
toString
-