1 16 17 package test.wsdl.interop3.groupE; 18 19 24 public class List { 25 26 private int varInt; 28 private String varString; 29 private List child; 30 31 34 public List() {} 35 36 39 public List(int i, String s, List c) { 40 this.varInt = i; 41 this.varString = s; 42 this.child = c; 43 } 44 45 48 public int getVarInt() { 49 return varInt; 50 } 51 52 55 public void setVarInt(int varInt) { 56 this.varInt = varInt; 57 } 58 59 62 public String getVarString() { 63 return varString; 64 } 65 66 69 public void setVarString(String varString) { 70 this.varString = varString; 71 } 72 73 76 public List getChild() { 77 return child; 78 } 79 80 83 public void setChild(List c) { 84 this.child = c; 85 } 86 87 90 public boolean equals(Object object) { 91 if (!(object instanceof List)) return false; 92 93 List that = (List)object; 94 95 if (this.varInt != that.varInt) return false; 96 97 if (this.varString == null) { 98 if (that.varString != null) return false; 99 } else { 100 if (!this.varString.equals(that.varString)) return false; 101 } 102 103 if (this.child == null) { 104 if (that.child != null) return false; 105 } else { 106 if (!this.child.equals(that.child)) return false; 107 } 108 109 return true; 110 } 111 112 115 public String toString() { 116 return "{" + varInt + ", \"" + varString + "\", " + 117 (child == null ? null :child.toString()) + "}"; 118 } 119 } 120 | Popular Tags |