145 |
|
// etc. are not declared abstract but otherwise act as abstract methods. |
146 |
|
|
147 |
|
/** |
148 |
< |
* Convert the given time duration in the given unit to this |
149 |
< |
* unit. Conversions from finer to coarser granularities |
150 |
< |
* truncate, so lose precision. For example converting |
151 |
< |
* {@code 999} milliseconds to seconds results in |
152 |
< |
* {@code 0}. Conversions from coarser to finer granularities |
153 |
< |
* with arguments that would numerically overflow saturate to |
154 |
< |
* {@code Long.MIN_VALUE} if negative or {@code Long.MAX_VALUE} |
155 |
< |
* if positive. |
148 |
> |
* Converts the given time duration in the given unit to this unit. |
149 |
> |
* Conversions from finer to coarser granularities truncate, so |
150 |
> |
* lose precision. For example, converting {@code 999} milliseconds |
151 |
> |
* to seconds results in {@code 0}. Conversions from coarser to |
152 |
> |
* finer granularities with arguments that would numerically |
153 |
> |
* overflow saturate to {@code Long.MIN_VALUE} if negative or |
154 |
> |
* {@code Long.MAX_VALUE} if positive. |
155 |
|
* |
156 |
|
* <p>For example, to convert 10 minutes to milliseconds, use: |
157 |
|
* {@code TimeUnit.MILLISECONDS.convert(10L, TimeUnit.MINUTES)} |