1 18 19 20 package sync4j.framework.core; 21 22 29 public final class VerDTD 30 implements java.io.Serializable { 31 32 34 private String value; 35 36 38 42 public VerDTD() {} 43 44 50 public VerDTD(final String value) { 51 setValue(value); 52 } 53 54 56 61 public String getValue() { 62 return value; 63 } 64 65 70 public void setValue(String value) { 71 if ((value == null) || (value.length() == 0)) { 72 throw new IllegalArgumentException ("value cannot be null or empty"); 73 } 74 this.value = value; 75 } 76 77 86 public boolean equals(Object obj) { 87 if ((obj instanceof VerDTD) == false) { 88 return false; 89 } 90 return (((VerDTD) obj).getValue().equals(value)); 91 } 92 } 93 | Popular Tags |