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

// $Id: LongArr.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 LongArr
{
   private long[] longArr;

   public LongArr()
   {
   }

   public LongArr(long[] longArr)
   {
      this.longArr = longArr;
   }

   public long[] getLongArr()
   {
      return longArr;
   }

   public void setLongArr(long[] longArr)
   {
      this.longArr = longArr;
   }
   
   public boolean equals(Object obj)
   {
      return toString().equals("" + obj);
   }

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