Blame | Last modification | View Log | RSS feed
package in.shop2020.model;public enum Category {NA(10000),Mobile_Phones(10001),Business_Phones(10002),Highend_Multimedia_Phones(10003),Lowend_Multimedia_Phones(10004),Basic_Phones(10005),Mobile_Accessories(10011),Bluetooth_Headset(10012),Memory_Card(10013),Battery(10014),Headset(10015),Charger(10016),Pendrive(10017),Tablets(10010),Laptops(10050),Laptop_Accessories(10070),Keyboards(100080),Mouse(100081);private final int value;private Category(int value) {this.value = value;}/*** Get the integer value of this enum value.*/public int getValue() {return value;}/*** Find a the enum type by its integer value.* @return - if the value is not found.*/public static Category findByValue(int value) {switch (value) {case 10000:return NA;case 10001:return Mobile_Phones;case 10002:return Business_Phones;case 10003:return Highend_Multimedia_Phones;case 10004:return Lowend_Multimedia_Phones;case 10005:return Basic_Phones;case 10011:return Mobile_Accessories;case 10012:return Bluetooth_Headset;case 10013:return Memory_Card;case 10014:return Battery;case 10015:return Headset;case 10016:return Charger;case 10017:return Pendrive;case 10010:return Tablets;case 10050:return Laptops;case 10070:return Laptop_Accessories;case 100080:return Keyboards;case 100081:return Mouse;default:return null;}}}