long time and a TimeUnit.
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| pack-priv static final int | |
| public static final TimeValue | MAX_VALUE
A constant holding the maximum value a |
| public static final TimeValue | NEG_ONE_MILLISECOND
A negative one millisecond |
| public static final TimeValue | NEG_ONE_SECOND
A negative one second |
| private final TimeUnit | |
| public static final TimeValue | ZERO_MILLISECONDS
A zero milliseconds |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static int | asBoundInt(final long
a long value to convert value)Returns the given |
| public int | compareTo(final TimeValue
the object to be compared. other)Implements java. |
| public long | |
| public static <T extends TimeValue> T | Returns: timeValue or defaultValuemay be timeValue, final T nullmay be defaultValue)nullReturns the given |
| public static TimeValue | defaultsToNegativeOneMillisecond(final TimeValue
may be timeValue)nullReturns the given |
| public static TimeValue | defaultsToNegativeOneSecond(final TimeValue
may be timeValue)nullReturns the given |
| public static TimeValue | defaultsToZeroMilliseconds(final TimeValue
may be timeValue)nullReturns the given |
| public TimeValue | Returns: this / divisorvalue by which this TimeValue is to be divided. divisor)Returns a TimeValue whose value is |
| public TimeValue | |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. |
| public long | |
| public TimeUnit | |
| public int | |
| public static boolean | |
| public static boolean | |
| public TimeValue | |
| private TimeUnit | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| public static TimeValue | |
| private int | |
| private int | |
| public void | |
| public void | |
| public void | |
| pack-priv static ChronoUnit | Returns: the converted equivalent ChronoUnitConverts a |
| public long | |
| public Duration | |
| public long | |
| public long | |
| public long | |
| public int | |
| public long | |
| public long | |
| public long | |
| public int | |
| public String | |
| public Timeout |
| duration | back to summary |
|---|---|
| private final long duration | |
| INT_UNDEFINED | back to summary |
|---|---|
| pack-priv static final int INT_UNDEFINED | |
| MAX_VALUE | back to summary |
|---|---|
| public static final TimeValue MAX_VALUE A constant holding the maximum value a | |
| NEG_ONE_MILLISECOND | back to summary |
|---|---|
| public static final TimeValue NEG_ONE_MILLISECOND A negative one millisecond | |
| NEG_ONE_SECOND | back to summary |
|---|---|
| public static final TimeValue NEG_ONE_SECOND A negative one second | |
| timeUnit | back to summary |
|---|---|
| private final TimeUnit timeUnit | |
| ZERO_MILLISECONDS | back to summary |
|---|---|
| public static final TimeValue ZERO_MILLISECONDS A zero milliseconds | |
| TimeValue | back to summary |
|---|---|
| pack-priv TimeValue(final long duration, final TimeUnit timeUnit) | |
| asBoundInt | back to summary |
|---|---|
| public static int asBoundInt(final long value) Returns the given
For example:
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(final TimeValue other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| convert | back to summary |
|---|---|
| public long convert(final TimeUnit targetTimeUnit) | |
| defaultsTo | back to summary |
|---|---|
| public static <T extends TimeValue> T defaultsTo(final T timeValue, final T defaultValue) Returns the given
| |
| defaultsToNegativeOneMillisecond | back to summary |
|---|---|
| public static TimeValue defaultsToNegativeOneMillisecond(final TimeValue timeValue) Returns the given
| |
| defaultsToNegativeOneSecond | back to summary |
|---|---|
| public static TimeValue defaultsToNegativeOneSecond(final TimeValue timeValue) Returns the given
| |
| defaultsToZeroMilliseconds | back to summary |
|---|---|
| public static TimeValue defaultsToZeroMilliseconds(final TimeValue timeValue) Returns the given
| |
| divide | back to summary |
|---|---|
| public TimeValue divide(final long divisor) Returns a TimeValue whose value is
| |
| divide | back to summary |
|---|---|
| public TimeValue divide(final long divisor, final TimeUnit targetTimeUnit) Returns a TimeValue whose value is
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDuration | back to summary |
|---|---|
| public long getDuration() | |
| getTimeUnit | back to summary |
|---|---|
| public TimeUnit getTimeUnit() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isNonNegative | back to summary |
|---|---|
| public static boolean isNonNegative(final TimeValue timeValue) | |
| isPositive | back to summary |
|---|---|
| public static boolean isPositive(final TimeValue timeValue) | |
| min | back to summary |
|---|---|
| public TimeValue min(final TimeValue other) | |
| min | back to summary |
|---|---|
| private TimeUnit min(final TimeUnit other) | |
| of | back to summary |
|---|---|
| public static TimeValue of(final long duration, final TimeUnit timeUnit) Creates a TimeValue. | |
| of | back to summary |
|---|---|
| public static TimeValue of(final Duration duration) Creates a TimeValue from a Duration. | |
| ofDays | back to summary |
|---|---|
| public static TimeValue ofDays(final long days) | |
| ofHours | back to summary |
|---|---|
| public static TimeValue ofHours(final long hours) | |
| ofMicroseconds | back to summary |
|---|---|
| public static TimeValue ofMicroseconds(final long microseconds) | |
| ofMilliseconds | back to summary |
|---|---|
| public static TimeValue ofMilliseconds(final long millis) | |
| ofMinutes | back to summary |
|---|---|
| public static TimeValue ofMinutes(final long minutes) | |
| ofNanoseconds | back to summary |
|---|---|
| public static TimeValue ofNanoseconds(final long nanoseconds) | |
| ofSeconds | back to summary |
|---|---|
| public static TimeValue ofSeconds(final long seconds) | |
| parse | back to summary |
|---|---|
| public static TimeValue parse(final String value) throws ParseException Parses a TimeValue in the format Parses:
| |
| scale | back to summary |
|---|---|
| private int scale() | |
| scale | back to summary |
|---|---|
| private int scale(final TimeUnit tUnit) Returns a made up scale for TimeUnits.
| |
| sleep | back to summary |
|---|---|
| public void sleep() throws InterruptedException | |
| timedJoin | back to summary |
|---|---|
| public void timedJoin(final Thread thread) throws InterruptedException | |
| timedWait | back to summary |
|---|---|
| public void timedWait(final Object obj) throws InterruptedException | |
| toChronoUnit | back to summary |
|---|---|
| pack-priv static ChronoUnit toChronoUnit(final TimeUnit timeUnit) Converts a
| |
| toDays | back to summary |
|---|---|
| public long toDays() | |
| toDuration | back to summary |
|---|---|
| public Duration toDuration() Converts this instance of to a Duration.
| |
| toHours | back to summary |
|---|---|
| public long toHours() | |
| toMicroseconds | back to summary |
|---|---|
| public long toMicroseconds() | |
| toMilliseconds | back to summary |
|---|---|
| public long toMilliseconds() | |
| toMillisecondsIntBound | back to summary |
|---|---|
| public int toMillisecondsIntBound() | |
| toMinutes | back to summary |
|---|---|
| public long toMinutes() | |
| toNanoseconds | back to summary |
|---|---|
| public long toNanoseconds() | |
| toSeconds | back to summary |
|---|---|
| public long toSeconds() | |
| toSecondsIntBound | back to summary |
|---|---|
| public int toSecondsIntBound() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toTimeout | back to summary |
|---|---|
| public Timeout toTimeout() | |