1 19 package fr.dyade.aaa.agent.conf; 20 21 import java.io.*; 22 23 26 public class A3CMLProperty implements Serializable { 27 28 public String name = null; 29 30 public String value = null; 31 32 public A3CMLProperty(String name, String value) { 33 this.name = name; 34 this.value = value; 35 } 36 37 public A3CMLProperty duplicate() throws Exception { 38 A3CMLProperty clone = new A3CMLProperty(name, value); 39 return clone; 40 } 41 42 public String toString() { 43 StringBuffer strBuf = new StringBuffer (); 44 strBuf.append("("); 45 strBuf.append(super.toString()); 46 strBuf.append(",").append(name).append("=").append(value); 47 strBuf.append(")"); 48 return strBuf.toString(); 49 } 50 51 public boolean equals(Object obj) { 52 if (obj == null) return false; 53 54 if (obj instanceof A3CMLProperty) { 55 A3CMLProperty prop = (A3CMLProperty) obj; 56 if (((name == prop.name) || 57 ((name != null) && name.equals(prop.name))) && 58 ((value == prop.value) || 59 ((value != null) && value.equals(prop.value)))) 60 return true; 61 } 62 return false; 63 } 64 } 65 | Popular Tags |