LedStatus.java
Go to the documentation of this file.
1 
25 package org.openkinect.freenect;
26 
27 import java.util.HashMap;
28 import java.util.Map;
29 
30 public enum LedStatus {
31  OFF(0),
32  GREEN(1),
33  RED(2),
34  YELLOW(3),
38 
39  private final int value;
40  private static final Map<Integer, LedStatus> MAP = new HashMap<Integer, LedStatus>(7);
41  static {
42  for(LedStatus v : LedStatus.values()) {
43  MAP.put(v.intValue(), v);
44  }
45  }
46 
47  private LedStatus(int value) {
48  this.value = value;
49  }
50 
51  public int intValue() {
52  return value;
53  }
54 
55  public static LedStatus fromInt(int value) {
56  return MAP.get(value);
57  }
58 }
static LedStatus fromInt(int value)
Definition: LedStatus.java:55


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Mon Jun 10 2019 13:46:42