summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/lifecycle/instance/stateMachine/States.java
blob: 638a7b0ea5db091b3add5881d33bc1ee7ee93408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.c2kernel.lifecycle.instance.stateMachine;


/**
 * @author XSeb74
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class States
{
	public final static int WAITING = 0;
	public final static int RESERVED = 1;
	public final static int STARTED = 2;
	public final static int SUSPENDED = 3;
	public final static int FINISHED = 4;
	public final static int RWAITING = 5;
	public final static int RRESERVED = 6;
	public final static int RSTARTED = 7;
	public final static int RSUSPENDED = 8;
    
    //everything less that this constant is NOT a repeating state
    public final static int REPEATSTATESTART = 5;

	public static final String[] states = { "Waiting", "Reserved", "Started", "Suspended", "Finished", "Waiting(R)", "Reserved(R)", "Started(R)", "Suspended(R)" };

	public static String getStateName(int state)
	{
		try
		{
			return states[state];
		}
		catch (ArrayIndexOutOfBoundsException ex)
		{
			return "Invalid State: " + state;
		}
	}
}