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