Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix bug with const in java bindings
[simgrid.git] / src / bindings / java / org / simgrid / surf / ActionState.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.12
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8
9 package org.simgrid.surf;
10
11 public final class ActionState {
12   public final static ActionState SURF_ACTION_READY = new ActionState("SURF_ACTION_READY", SurfJNI.SURF_ACTION_READY_get());
13   public final static ActionState SURF_ACTION_RUNNING = new ActionState("SURF_ACTION_RUNNING");
14   public final static ActionState SURF_ACTION_FAILED = new ActionState("SURF_ACTION_FAILED");
15   public final static ActionState SURF_ACTION_DONE = new ActionState("SURF_ACTION_DONE");
16   public final static ActionState SURF_ACTION_TO_FREE = new ActionState("SURF_ACTION_TO_FREE");
17   public final static ActionState SURF_ACTION_NOT_IN_THE_SYSTEM = new ActionState("SURF_ACTION_NOT_IN_THE_SYSTEM");
18
19   public final int swigValue() {
20     return swigValue;
21   }
22
23   public String toString() {
24     return swigName;
25   }
26
27   public static ActionState swigToEnum(int swigValue) {
28     if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
29       return swigValues[swigValue];
30     for (int i = 0; i < swigValues.length; i++)
31       if (swigValues[i].swigValue == swigValue)
32         return swigValues[i];
33     throw new IllegalArgumentException("No enum " + ActionState.class + " with value " + swigValue);
34   }
35
36   private ActionState(String swigName) {
37     this.swigName = swigName;
38     this.swigValue = swigNext++;
39   }
40
41   private ActionState(String swigName, int swigValue) {
42     this.swigName = swigName;
43     this.swigValue = swigValue;
44     swigNext = swigValue+1;
45   }
46
47   private ActionState(String swigName, ActionState swigEnum) {
48     this.swigName = swigName;
49     this.swigValue = swigEnum.swigValue;
50     swigNext = this.swigValue+1;
51   }
52
53   private static ActionState[] swigValues = { SURF_ACTION_READY, SURF_ACTION_RUNNING, SURF_ACTION_FAILED, SURF_ACTION_DONE, SURF_ACTION_TO_FREE, SURF_ACTION_NOT_IN_THE_SYSTEM };
54   private static int swigNext = 0;
55   private final int swigValue;
56   private final String swigName;
57 }
58