Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / bindings / java / org / simgrid / surf / ResourceState.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.11
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 ResourceState {
12   public final static ResourceState SURF_RESOURCE_ON = new ResourceState("SURF_RESOURCE_ON", SurfJNI.SURF_RESOURCE_ON_get());
13   public final static ResourceState SURF_RESOURCE_OFF = new ResourceState("SURF_RESOURCE_OFF", SurfJNI.SURF_RESOURCE_OFF_get());
14
15   public final int swigValue() {
16     return swigValue;
17   }
18
19   public String toString() {
20     return swigName;
21   }
22
23   public static ResourceState swigToEnum(int swigValue) {
24     if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
25       return swigValues[swigValue];
26     for (int i = 0; i < swigValues.length; i++)
27       if (swigValues[i].swigValue == swigValue)
28         return swigValues[i];
29     throw new IllegalArgumentException("No enum " + ResourceState.class + " with value " + swigValue);
30   }
31
32   private ResourceState(String swigName) {
33     this.swigName = swigName;
34     this.swigValue = swigNext++;
35   }
36
37   private ResourceState(String swigName, int swigValue) {
38     this.swigName = swigName;
39     this.swigValue = swigValue;
40     swigNext = swigValue+1;
41   }
42
43   private ResourceState(String swigName, ResourceState swigEnum) {
44     this.swigName = swigName;
45     this.swigValue = swigEnum.swigValue;
46     swigNext = this.swigValue+1;
47   }
48
49   private static ResourceState[] swigValues = { SURF_RESOURCE_ON, SURF_RESOURCE_OFF };
50   private static int swigNext = 0;
51   private final int swigValue;
52   private final String swigName;
53 }
54