source: trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexit.java @ 664

Last change on this file since 664 was 664, checked in by sherbold, 12 years ago
  • modified Command.help(): the help now returns a string with its usage instead of writing directly to the console
  • modified listCommands: now writes the help string of each command instead of just the name; this way, the parameters are displayed directly
  • moved listCommands from quest-ui-core to java-utils
File size: 622 bytes
Line 
1package de.ugoe.cs.util.console.defaultcommands;
2
3import java.util.List;
4
5import de.ugoe.cs.util.console.Command;
6
7/**
8 * <p>
9 * Command to terminate an application.
10 * </p>
11 *
12 * @author Steffen Herbold
13 * @version 1.0
14 */
15public class CMDexit implements Command {
16
17        /*
18         * (non-Javadoc)
19         *
20         * @see databasebuilder.console.commands.Command#help()
21         */
22        @Override
23        public String help() {
24                return "exit";
25        }
26
27        /*
28         * (non-Javadoc)
29         *
30         * @see de.ugoe.cs.util.console.Command#run(java.util.List)
31         */
32        @Override
33        public void run(List<Object> parameters) {
34                System.exit(0);
35        }
36
37}
Note: See TracBrowser for help on using the repository browser.