1 16 17 package org.springframework.core.enums; 18 19 29 public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum { 30 31 34 private final Short code; 35 36 37 42 public ShortCodedLabeledEnum(int code, String label) { 43 super(label); 44 this.code = new Short ((short) code); 45 } 46 47 48 public Comparable getCode() { 49 return code; 50 } 51 52 55 public short getShortCode() { 56 return ((Short ) getCode()).shortValue(); 57 } 58 59 } 60 | Popular Tags |