1 7 package org.jboss.test.webservice.marshalltest.types; 8 9 10 11 13 19 public class IntegerArr 20 { 21 private int[] intArr; 22 23 public IntegerArr() 24 { 25 } 26 27 public IntegerArr(int[] intArr) 28 { 29 this.intArr = intArr; 30 } 31 32 public int[] getIntegerArr() 33 { 34 return intArr; 35 } 36 37 public void setIntegerArr(int[] intArr) 38 { 39 this.intArr = intArr; 40 } 41 42 public boolean equals(Object obj) 43 { 44 return toString().equals("" + obj); 45 } 46 47 public String toString() 48 { 49 if (intArr != null) 50 { 51 StringBuffer ret = new StringBuffer ("["); 52 for (int i = 0; i < intArr.length; i++) 53 { 54 int val = intArr[i]; 55 ret.append(i == 0 ? "" + val : "," + val); 56 } 57 ret.append("]"); 58 return ret.toString(); 59 } 60 else 61 { 62 return "[]"; 63 } 64 } 65 } 66 | Popular Tags |