KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > AskCommand


1 package example;
2
3 import com.caucho.util.L10N;
4 import java.util.logging.Logger JavaDoc;
5 import java.util.logging.Level JavaDoc;
6
7 import java.io.IOException JavaDoc;
8
9 /**
10  *
11  */

12 public class AskCommand extends AbstractCommand {
13   static protected final Logger JavaDoc log =
14     Logger.getLogger(AskCommand.class.getName());
15   static final L10N L = new L10N(AskCommand.class);
16
17   public void init()
18   {
19     super.init();
20   }
21
22   void parse(Parser p)
23     throws IOException JavaDoc
24   {
25   }
26
27   String JavaDoc act(Magic8Ball magic8ball)
28   {
29     return magic8ball.getProphet() + " says \"" + magic8ball.getProphecy() + '"';
30   }
31
32 }
33
34
Popular Tags