1 20 package org.openi.util; 21 22 import java.io.*; 23 24 25 28 public class NameValue implements Serializable { 29 private String displayName; 30 private Object value; 31 32 public NameValue(String name, Object value) { 33 this.displayName = name; 34 this.value = value; 35 } 36 37 40 public String getDisplayName() { 41 return displayName; 42 } 43 44 47 public void setDisplayName(String displayName) { 48 this.displayName = displayName; 49 } 50 51 54 public Object getValue() { 55 return value; 56 } 57 58 61 public void setValue(Object value) { 62 this.value = value; 63 } 64 65 public String toString() { 66 StringBuffer buffer = new StringBuffer (); 67 68 if (this != null) { 69 buffer.append("name="); 70 buffer.append(String.valueOf(this.getDisplayName())); 71 buffer.append(", "); 72 buffer.append("value="); 73 buffer.append(String.valueOf(this.getValue())); 74 } 75 76 return buffer.toString(); 77 } 78 } 79 | Popular Tags |