1 23 package org.mdarad.framework.enumeration; 24 25 import java.io.Serializable ; 26 27 34 public abstract class AllowableValue implements Serializable { 35 36 42 public AllowableValue(String value, String label) { 43 this.value = value; 44 this.label = label; 45 } 46 47 48 49 52 private String value; 53 54 public String getValue() { 55 return value; 56 } 57 58 public void setValue(String string) { 59 value = string; 60 } 61 62 65 private String label; 66 67 public String getLabel() { 68 return label; 69 } 70 71 public void setLabel(String string) { 72 label = string; 73 } 74 75 82 public boolean equals(Object obj) { 83 if (!(obj instanceof AllowableValue)) { 84 throw new IllegalArgumentException ("The object to be compared is of the wrong type"); 85 } 86 87 AllowableValue allObj = (AllowableValue) obj; 88 return this.getValue().equals(allObj.getValue()); 89 } 90 } 91 | Popular Tags |