/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.webservice.marshalltest.types;



// $Id: IntegerArr.java,v 1.2.2.1 2004/10/24 19:12:34 tdiesler Exp $

/**
 * Created by IntelliJ IDEA.
 *
 * @author Thomas.Diesler@jboss.org
 * @since 24-Sep-2004
 */
public class IntegerArr
{
   private int[] intArr;

   public IntegerArr()
   {
   }

   public IntegerArr(int[] intArr)
   {
      this.intArr = intArr;
   }

   public int[] getIntegerArr()
   {
      return intArr;
   }

   public void setIntegerArr(int[] intArr)
   {
      this.intArr = intArr;
   }

   public boolean equals(Object obj)
   {
      return toString().equals("" + obj);
   }

   public String toString()
   {
      if (intArr != null)
      {
         StringBuffer ret = new StringBuffer("[");
         for (int i = 0; i < intArr.length; i++)
         {
            int val = intArr[i];
            ret.append(i == 0 ? "" + val : "," + val);
         }
         ret.append("]");
         return ret.toString();
      }
      else
      {
         return "[]";
      }
   }
}
