Rev 31267 | Rev 32438 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.enumuration.fofo;public enum Milestone {ABOVE_TEN_LAC("> 10 Lac"), FOUR_TO_TEN_LAC("4Lac to 10Lac"), THREE_TO_FOUR_LAC("3Lac to 4Lac"),TWO_TO_THREE_LAC("2Lac to 3Lac"), LESS_THAN_TWO_LAC("< 2 Lac"), ZERO("0");private String value;private Milestone(String value) {this.value = value;}public String getValue() {return value;}@Overridepublic String toString() {return value;}public static Milestone get(int value) {Milestone milestone = Milestone.ZERO;if (value >= 1000000) {milestone = Milestone.ABOVE_TEN_LAC;} else if (value >= 400000 && value < 1000000) {milestone = Milestone.FOUR_TO_TEN_LAC;} else if (value >= 300000 && value < 400000) {milestone = Milestone.THREE_TO_FOUR_LAC;} else if (value >= 200000 && value < 300000) {milestone = Milestone.TWO_TO_THREE_LAC;} else if (value < 200000 && value > 0) {milestone = Milestone.LESS_THAN_TWO_LAC;}return milestone;}}