01 /* This file is part of the project "Hilbert II" - http://www.qedeq.org
02 *
03 * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
04 *
05 * "Hilbert II" is free software; you can redistribute
06 * it and/or modify it under the terms of the GNU General Public
07 * License as published by the Free Software Foundation; either
08 * version 2 of the License, or (at your option) any later version.
09 *
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
16 package org.qedeq.kernel.se.state;
17
18 import org.qedeq.kernel.se.common.State;
19
20 /**
21 * Represents a mathematical module state. Every instance of this class is unique.
22 *
23 * @author Michael Meyling
24 */
25 public final class WellFormedState extends AbstractState implements State {
26
27 /** Unchecked. */
28 public static final WellFormedState STATE_UNCHECKED
29 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_UNCHECKED,
30 false, WellFormedStateDescriptions.STATE_CODE_UNCHECKED);
31
32 /** External checking. */
33 public static final WellFormedState STATE_EXTERNAL_CHECKING
34 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_EXTERNAL_CHECKING,
35 false, WellFormedStateDescriptions.STATE_CODE_EXTERNAL_CHECKING);
36
37 /** External checking failed. */
38 public static final WellFormedState STATE_EXTERNAL_CHECKING_FAILED
39 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_EXTERNAL_CHECKING_FAILED,
40 true, WellFormedStateDescriptions.STATE_CODE_EXTERNAL_CHECKING_FAILED);
41
42 /** Internal checking phase. */
43 public static final WellFormedState STATE_INTERNAL_CHECKING
44 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_INTERNAL_CHECKING,
45 false, WellFormedStateDescriptions.STATE_CODE_INTERNAL_CHECKING);
46
47 /** Internal check failed. */
48 public static final WellFormedState STATE_INTERNAL_CHECKING_FAILED
49 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_INTERNAL_CHECKING_FAILED,
50 true, WellFormedStateDescriptions.STATE_CODE_INTERNAL_CHECKING_FAILED);
51
52
53 /** Successfully completely checked. */
54 public static final WellFormedState STATE_CHECKED
55 = new WellFormedState(WellFormedStateDescriptions.STATE_STRING_COMPLETELY_CHECKED,
56 false, WellFormedStateDescriptions.STATE_CODE_COMPLETELY_CHECKED);
57
58
59 /**
60 * Creates new module state.
61 *
62 * @param text meaning of this state, <code>null</code> is not permitted.
63 * @param failure is this a failure state?
64 * @param code code of this state.
65 * @throws IllegalArgumentException text == <code>null</code>
66 */
67 private WellFormedState(final String text, final boolean failure, final int code) {
68 super(text, failure, code);
69 }
70
71 }
|