Subversion Repositories SmartDukaan

Rev

Rev 1013 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1013 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.user;
6
package in.shop2020.model.v1.user;
7
 
7
 
8
 
8
 
9
import java.util.Map;
9
import java.util.Map;
10
import java.util.HashMap;
10
import java.util.HashMap;
11
import org.apache.thrift.TEnum;
11
import org.apache.thrift.TEnum;
-
 
12
 
12
public enum WidgetType implements TEnum{
13
public enum WidgetType implements org.apache.thrift.TEnum {
13
    MY_RESEARCH(0),
14
  MY_RESEARCH(0),
14
    BROWSE_HISTORY(1);
15
  BROWSE_HISTORY(1);
15
 
-
 
16
  private static final Map<Integer, WidgetType> BY_VALUE = new HashMap<Integer,WidgetType>() {{
-
 
17
    for(WidgetType val : WidgetType.values()) {
-
 
18
      put(val.getValue(), val);
-
 
19
    }
-
 
20
  }};
-
 
21
 
16
 
22
  private final int value;
17
  private final int value;
23
 
18
 
24
  private WidgetType(int value) {
19
  private WidgetType(int value) {
25
    this.value = value;
20
    this.value = value;
Line 35... Line 30...
35
  /**
30
  /**
36
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
31
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
37
   * @return null if the value is not found.
32
   * @return null if the value is not found.
38
   */
33
   */
39
  public static WidgetType findByValue(int value) { 
34
  public static WidgetType findByValue(int value) { 
-
 
35
    switch (value) {
-
 
36
      case 0:
40
    return BY_VALUE.get(value);
37
        return MY_RESEARCH;
-
 
38
      case 1:
-
 
39
        return BROWSE_HISTORY;
-
 
40
      default:
-
 
41
        return null;
-
 
42
    }
41
  }
43
  }
42
}
44
}