diff -r 000000000000 -r 77b6002451c4 samples/codeinjection/src/org/apidesign/codeinjection/CountDown.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samples/codeinjection/src/org/apidesign/codeinjection/CountDown.java Sat Jan 10 21:29:22 2009 +0100 @@ -0,0 +1,27 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.apidesign.codeinjection; + +/** API class that can counts a count down. + * + * @author Jaroslav Tulach + * @since 1.0 + */ +// BEGIN: codeinjection.CountDown +public abstract class CountDown { + CountDown() { + } + + public static CountDown create(int initial) { + return new CountDownImplV1(initial); + } + + /** Decrements the counter */ + public abstract void down(); + /** @return true if the counter is 0 or less */ + public abstract boolean isDown(); +} +// END: codeinjection.CountDown