1 16 17 package org.springframework.core.enums; 18 19 25 public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum { 26 27 30 private final String label; 31 32 33 38 protected AbstractGenericLabeledEnum(String label) { 39 this.label = label; 40 } 41 42 43 public String getLabel() { 44 if (this.label != null) { 45 return label; 46 } 47 else { 48 return getCode().toString(); 49 } 50 } 51 52 } 53 | Popular Tags |