Source code: org/metacosm/framework/command/Result.java
1 /*
2 Metacosm, an object-oriented network game framework
3 Copyright (C) 1999-2001 Metacosm Development Team
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 package org.metacosm.framework.command;
21
22 /**
23 * Result from the execute() method from commands.
24 * @see PlayerCommand
25 * @see ControllerCommand
26 */
27 final public class Result {
28 /**
29 * Allowed command
30 */
31 public static Result OK = new Result();
32 /**
33 * At least one parameter and no needed
34 */
35 public static Result UNEXPECTED_PARAMETER = new Result();
36 /**
37 * X (X > 0) parameters and Y (Y < X) needed
38 */
39 public static Result TOO_MANY_PARAMETERS = new Result();
40 /**
41 * X (X > 0) parameters and X+1 needed
42 */
43 public static Result NOT_ENOUGH_PARAMETERS = new Result();
44 /**
45 * At least one parameter is illegal/invalid/incorrect/inconsistent/incoherent/inapplicable/unfriendly
46 */
47 public static Result BAD_PARAMETER = new Result();
48 /**
49 * This command can't be applied to this Controller/Player.
50 */
51 public static Result INAPPLICABLE = new Result();
52 /**
53 * Something bad happened.
54 */
55 public static Result UNKNOWN_ERROR = new Result();
56 /**
57 * Only public instances in parameters are available.
58 */
59 private Result() {
60 }
61 }