| author | Jaroslav Tulach <jtulach@netbeans.org> |
| Fri Aug 27 14:06:39 2010 +0200 | |
| changeset 365 | 0b7ec6ef8a72 |
| permissions | -rw-r--r-- |
| jtulach@303 | 1 |
/* |
| jtulach@303 | 2 |
* To change this template, choose Tools | Templates |
| jtulach@303 | 3 |
* and open the template in the editor. |
| jtulach@303 | 4 |
*/ |
| jtulach@303 | 5 |
|
| jtulach@303 | 6 |
package org.apidesign.codeinjection; |
| jtulach@303 | 7 |
|
| jtulach@303 | 8 |
/** API class that can counts a count down. |
| jtulach@303 | 9 |
* |
| jtulach@303 | 10 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
| jtulach@303 | 11 |
* @since 1.0 |
| jtulach@303 | 12 |
*/ |
| jtulach@303 | 13 |
// BEGIN: codeinjection.CountDown |
| jtulach@303 | 14 |
public abstract class CountDown {
|
| jtulach@303 | 15 |
CountDown() {
|
| jtulach@303 | 16 |
} |
| jtulach@303 | 17 |
|
| jtulach@303 | 18 |
public static CountDown create(int initial) {
|
| jtulach@303 | 19 |
return new CountDownImplV1(initial); |
| jtulach@303 | 20 |
} |
| jtulach@303 | 21 |
|
| jtulach@303 | 22 |
/** Decrements the counter */ |
| jtulach@303 | 23 |
public abstract void down(); |
| jtulach@303 | 24 |
/** @return true if the counter is 0 or less */ |
| jtulach@303 | 25 |
public abstract boolean isDown(); |
| jtulach@303 | 26 |
} |
| jtulach@303 | 27 |
// END: codeinjection.CountDown |