samples/codeinjection/src/org/apidesign/codeinjection/CountDown.java
changeset 303 77b6002451c4
child 398 b87fd959548b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/codeinjection/src/org/apidesign/codeinjection/CountDown.java	Sat Jan 10 21:29:22 2009 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +/*
     1.5 + * To change this template, choose Tools | Templates
     1.6 + * and open the template in the editor.
     1.7 + */
     1.8 +
     1.9 +package org.apidesign.codeinjection;
    1.10 +
    1.11 +/** API class that can counts a count down.
    1.12 + *
    1.13 + * @author Jaroslav Tulach <jtulach@netbeans.org>
    1.14 + * @since 1.0
    1.15 + */
    1.16 +// BEGIN: codeinjection.CountDown
    1.17 +public abstract class CountDown {
    1.18 +    CountDown() {
    1.19 +    }
    1.20 +
    1.21 +    public static CountDown create(int initial) {
    1.22 +        return new CountDownImplV1(initial);
    1.23 +    }
    1.24 +
    1.25 +    /** Decrements the counter */
    1.26 +    public abstract void down();
    1.27 +    /** @return true if the counter is 0 or less */
    1.28 +    public abstract boolean isDown();
    1.29 +}
    1.30 +// END: codeinjection.CountDown