1 18 19 package sync4j.syncclient.spds.engine; 20 21 22 29 public class SyncItemKey { 30 31 33 36 private Object keyValue = null; 37 public Object getKeyValue(){ 38 return keyValue; 39 } 40 41 44 public void setKeyValue(Object keyValue){ 45 this.keyValue = keyValue; 46 } 47 48 50 53 public SyncItemKey(Object keyValue) { 54 this.keyValue = keyValue; 55 } 56 57 59 63 public String getKeyAsString() { 64 return keyValue.toString(); 65 } 66 67 74 public boolean equals(Object o) { 75 if (!(o instanceof SyncItemKey)) return false; 76 77 return ((SyncItemKey)o).getKeyValue().equals(keyValue); 78 } 79 80 83 public String toString() { 84 StringBuffer sb = new StringBuffer (getClass().getName()); 85 86 sb.append( " { " ); 87 sb.append( " keyValue: " ); 88 sb.append( getKeyAsString() ); 89 sb.append( " } " ); 90 91 return sb.toString(); 92 } 93 } | Popular Tags |