ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Delayed.java
Revision: 1.11
Committed: Wed Jan 16 01:59:47 2013 UTC (11 years, 4 months ago) by jsr166
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
Log Message:
<tt> -> {@code

File Contents

# User Rev Content
1 dl 1.1 /*
2     * Written by Doug Lea with assistance from members of JCP JSR-166
3 dl 1.7 * Expert Group and released to the public domain, as explained at
4 jsr166 1.9 * http://creativecommons.org/publicdomain/zero/1.0/
5 dl 1.1 */
6    
7     package java.util.concurrent;
8 jozart 1.6
9 dl 1.1 /**
10 dl 1.5 * A mix-in style interface for marking objects that should be
11     * acted upon after a given delay.
12 dl 1.4 *
13     * <p>An implementation of this interface must define a
14 jsr166 1.11 * {@code compareTo} method that provides an ordering consistent with
15     * its {@code getDelay} method.
16 dl 1.4 *
17 dl 1.3 * @since 1.5
18     * @author Doug Lea
19 dl 1.1 */
20 dl 1.8 public interface Delayed extends Comparable<Delayed> {
21 dl 1.1
22     /**
23 dl 1.8 * Returns the remaining delay associated with this object, in the
24     * given time unit.
25 jozart 1.6 *
26 dl 1.1 * @param unit the time unit
27 dl 1.8 * @return the remaining delay; zero or negative values indicate
28     * that the delay has already elapsed
29 dl 1.1 */
30 dl 1.3 long getDelay(TimeUnit unit);
31 dl 1.1 }