151 |
|
return d * m; |
152 |
|
} |
153 |
|
|
154 |
< |
// To maintain full signature compatibility with 1.5, method |
155 |
< |
// convert etc are not declared abstract but otherwise act as |
156 |
< |
// abstract methods. |
154 |
> |
// To maintain full signature compatibility with 1.5, and to improve the |
155 |
> |
// clarity of the generated javadoc (see 6287639: Abstract methods in |
156 |
> |
// enum classes should not be listed as abstract), method convert |
157 |
> |
// etc. are not declared abstract but otherwise act as abstract methods. |
158 |
|
|
159 |
|
/** |
160 |
|
* Convert the given time duration in the given unit to this |
165 |
|
* with arguments that would numerically overflow saturate to |
166 |
|
* <tt>Long.MIN_VALUE</tt> if negative or <tt>Long.MAX_VALUE</tt> |
167 |
|
* if positive. |
168 |
< |
* <p> |
169 |
< |
* For example, to convert 10 minutes to milliseconds, use: |
168 |
> |
* |
169 |
> |
* <p>For example, to convert 10 minutes to milliseconds, use: |
170 |
|
* <tt>TimeUnit.MILLISECONDS.convert(10L, TimeUnit.MINUTES)</tt> |
171 |
|
* |
172 |
< |
* @param sourceDuration the time duration in the given <tt>unit</tt> |
172 |
> |
* @param sourceDuration the time duration in the given <tt>sourceUnit</tt> |
173 |
|
* @param sourceUnit the unit of the <tt>sourceDuration</tt> argument |
174 |
|
* @return the converted duration in this unit, |
175 |
|
* or <tt>Long.MIN_VALUE</tt> if conversion would negatively |