1 7 package org.jboss.test.remoting.transport.web; 8 9 import java.io.Serializable ; 10 11 14 public class ComplexObject implements Serializable 15 { 16 public int i = 42; 17 public String s = "test"; 18 public boolean b = true; 19 20 public ComplexObject() 21 { 22 23 } 24 25 public ComplexObject(int i, String s, boolean b) 26 { 27 this.i = i; 28 this.s = s; 29 this.b = b; 30 } 31 32 public boolean equals(Object o) 33 { 34 if(o instanceof ComplexObject) 35 { 36 ComplexObject co = (ComplexObject) o; 37 if(co.i == i && co.s.equals(s) && co.b == b) 38 { 39 return true; 40 } 41 else 42 { 43 return false; 44 } 45 } 46 else 47 { 48 return false; 49 } 50 } 51 } | Popular Tags |