168 |
|
} |
169 |
|
|
170 |
|
/** |
171 |
< |
* Equivalent to {@code NANOSECONDS.convert(duration, this)}. |
171 |
> |
* Equivalent to |
172 |
> |
* {@link #convert(long, TimeUnit) NANOSECONDS.convert(duration, this)}. |
173 |
|
* @param duration the duration |
174 |
|
* @return the converted duration, |
175 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
176 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
176 |
– |
* @see #convert |
177 |
|
*/ |
178 |
|
public long toNanos(long duration) { |
179 |
|
throw new AbstractMethodError(); |
180 |
|
} |
181 |
|
|
182 |
|
/** |
183 |
< |
* Equivalent to {@code MICROSECONDS.convert(duration, this)}. |
183 |
> |
* Equivalent to |
184 |
> |
* {@link #convert(long, TimeUnit) MICROSECONDS.convert(duration, this)}. |
185 |
|
* @param duration the duration |
186 |
|
* @return the converted duration, |
187 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
188 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
188 |
– |
* @see #convert |
189 |
|
*/ |
190 |
|
public long toMicros(long duration) { |
191 |
|
throw new AbstractMethodError(); |
192 |
|
} |
193 |
|
|
194 |
|
/** |
195 |
< |
* Equivalent to {@code MILLISECONDS.convert(duration, this)}. |
195 |
> |
* Equivalent to |
196 |
> |
* {@link #convert(long, TimeUnit) MILLISECONDS.convert(duration, this)}. |
197 |
|
* @param duration the duration |
198 |
|
* @return the converted duration, |
199 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
200 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
200 |
– |
* @see #convert |
201 |
|
*/ |
202 |
|
public long toMillis(long duration) { |
203 |
|
throw new AbstractMethodError(); |
204 |
|
} |
205 |
|
|
206 |
|
/** |
207 |
< |
* Equivalent to {@code SECONDS.convert(duration, this)}. |
207 |
> |
* Equivalent to |
208 |
> |
* {@link #convert(long, TimeUnit) SECONDS.convert(duration, this)}. |
209 |
|
* @param duration the duration |
210 |
|
* @return the converted duration, |
211 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
212 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
212 |
– |
* @see #convert |
213 |
|
*/ |
214 |
|
public long toSeconds(long duration) { |
215 |
|
throw new AbstractMethodError(); |
216 |
|
} |
217 |
|
|
218 |
|
/** |
219 |
< |
* Equivalent to {@code MINUTES.convert(duration, this)}. |
219 |
> |
* Equivalent to |
220 |
> |
* {@link #convert(long, TimeUnit) MINUTES.convert(duration, this)}. |
221 |
|
* @param duration the duration |
222 |
|
* @return the converted duration, |
223 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
224 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
224 |
– |
* @see #convert |
225 |
|
* @since 1.6 |
226 |
|
*/ |
227 |
|
public long toMinutes(long duration) { |
229 |
|
} |
230 |
|
|
231 |
|
/** |
232 |
< |
* Equivalent to {@code HOURS.convert(duration, this)}. |
232 |
> |
* Equivalent to |
233 |
> |
* {@link #convert(long, TimeUnit) HOURS.convert(duration, this)}. |
234 |
|
* @param duration the duration |
235 |
|
* @return the converted duration, |
236 |
|
* or {@code Long.MIN_VALUE} if conversion would negatively |
237 |
|
* overflow, or {@code Long.MAX_VALUE} if it would positively overflow. |
237 |
– |
* @see #convert |
238 |
|
* @since 1.6 |
239 |
|
*/ |
240 |
|
public long toHours(long duration) { |
242 |
|
} |
243 |
|
|
244 |
|
/** |
245 |
< |
* Equivalent to {@code DAYS.convert(duration, this)}. |
245 |
> |
* Equivalent to |
246 |
> |
* {@link #convert(long, TimeUnit) DAYS.convert(duration, this)}. |
247 |
|
* @param duration the duration |
248 |
|
* @return the converted duration |
248 |
– |
* @see #convert |
249 |
|
* @since 1.6 |
250 |
|
*/ |
251 |
|
public long toDays(long duration) { |