TiltStatus.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 TiltStatus {
31  STOPPED(0),
32  LIMIT(1),
33  MOVING(4);
34 
35  private final int value;
36  private static final Map<Integer, TiltStatus> MAP = new HashMap<Integer, TiltStatus>(3);
37  static {
38  for(TiltStatus v : TiltStatus.values()) {
39  MAP.put(v.intValue(), v);
40  }
41  }
42 
43  private TiltStatus(int value) {
44  this.value = value;
45  }
46 
47  public int intValue() {
48  return value;
49  }
50 
51  public static TiltStatus fromInt(int value) {
52  return MAP.get(value);
53  }
54 }
static TiltStatus fromInt(int value)
Definition: TiltStatus.java:51


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38