public static final class DurationSpec.IntMinutesBound extends DurationSpec
DurationSpec.IntMillisecondsBound, DurationSpec.IntMinutesBound, DurationSpec.IntSecondsBound, DurationSpec.LongMillisecondsBound, DurationSpec.LongNanosecondsBound, DurationSpec.LongSecondsBound
Constructor and Description |
---|
IntMinutesBound(long minutes)
Creates a
DurationSpec.IntMinutesBound of the specified amount in minutes. |
IntMinutesBound(long quantity,
java.util.concurrent.TimeUnit unit)
Creates a
DurationSpec.IntMinutesBound of the specified amount in the specified unit. |
IntMinutesBound(java.lang.String value)
Creates a
DurationSpec.IntMinutesBound of the specified amount. |
Modifier and Type | Method and Description |
---|---|
int |
toMilliseconds()
Returns this duration in number of milliseconds as an
int |
int |
toMinutes()
Returns this duration in number of minutes as an
int |
int |
toSeconds()
Returns this duration in number of seconds as an
int |
public IntMinutesBound(java.lang.String value)
DurationSpec.IntMinutesBound
of the specified amount. The bound is [0, Integer.MAX_VALUE) in minutes.
The bound is [0, Integer.MAX_VALUE) in minutes.value
- the durationpublic IntMinutesBound(long quantity, java.util.concurrent.TimeUnit unit)
DurationSpec.IntMinutesBound
of the specified amount in the specified unit.
The bound is [0, Integer.MAX_VALUE) in minutes.quantity
- where quantity shouldn't be bigger than Integer.MAX_VALUE - 1 in minutesunit
- in which the provided quantity ispublic IntMinutesBound(long minutes)
DurationSpec.IntMinutesBound
of the specified amount in minutes.
The bound is [0, Integer.MAX_VALUE) in minutes.minutes
- where minutes shouldn't be bigger than Integer.MAX_VALUE-1public int toMilliseconds()
int
Integer.MAX_VALUE
if the number of milliseconds is too large.public int toSeconds()
int
Integer.MAX_VALUE
if the number of seconds is too large.public int toMinutes()
int
Integer.MAX_VALUE
if the number of minutes is too large.Copyright © 2009- The Apache Software Foundation