/**
         * Compares for reference equality and value equality.
         */
        public bool equals(EntityStateUpdatePdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            ivarsEqual = base.Equals(rhs);

            if (!(_entityID.Equals(rhs._entityID)))
            {
                ivarsEqual = false;
            }
            if (!(_padding1 == rhs._padding1))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfArticulationParameters == rhs._numberOfArticulationParameters))
            {
                ivarsEqual = false;
            }
            if (!(_entityLinearVelocity.Equals(rhs._entityLinearVelocity)))
            {
                ivarsEqual = false;
            }
            if (!(_entityLocation.Equals(rhs._entityLocation)))
            {
                ivarsEqual = false;
            }
            if (!(_entityOrientation.Equals(rhs._entityOrientation)))
            {
                ivarsEqual = false;
            }
            if (!(_entityAppearance == rhs._entityAppearance))
            {
                ivarsEqual = false;
            }

            if (!(_articulationParameters.Count == rhs._articulationParameters.Count))
            {
                ivarsEqual = false;
            }
            if (ivarsEqual)
            {
                for (int idx = 0; idx < _articulationParameters.Count; idx++)
                {
                    if (!(_articulationParameters[idx].Equals(rhs._articulationParameters[idx])))
                    {
                        ivarsEqual = false;
                    }
                }
            }


            return(ivarsEqual);
        }
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(EntityStateUpdatePdu rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_entityID.Equals( rhs._entityID) )) ivarsEqual = false;
             if( ! (_padding1 == rhs._padding1)) ivarsEqual = false;
             if( ! (_numberOfArticulationParameters == rhs._numberOfArticulationParameters)) ivarsEqual = false;
             if( ! (_entityLinearVelocity.Equals( rhs._entityLinearVelocity) )) ivarsEqual = false;
             if( ! (_entityLocation.Equals( rhs._entityLocation) )) ivarsEqual = false;
             if( ! (_entityOrientation.Equals( rhs._entityOrientation) )) ivarsEqual = false;
             if( ! (_entityAppearance == rhs._entityAppearance)) ivarsEqual = false;

             for(int idx = 0; idx < _articulationParameters.Count; idx++)
             {
            ArticulationParameter x = (ArticulationParameter)_articulationParameters[idx];
            if( ! ( _articulationParameters[idx].Equals(rhs._articulationParameters[idx]))) ivarsEqual = false;
             }

            return ivarsEqual;
        }