Exemplo n.º 1
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(PointObjectStatePdu rhs)
        {
            bool ivarsEqual = true;

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

            if (!(_objectID.Equals(rhs._objectID)))
            {
                ivarsEqual = false;
            }
            if (!(_referencedObjectID.Equals(rhs._referencedObjectID)))
            {
                ivarsEqual = false;
            }
            if (!(_updateNumber == rhs._updateNumber))
            {
                ivarsEqual = false;
            }
            if (!(_forceID == rhs._forceID))
            {
                ivarsEqual = false;
            }
            if (!(_modifications == rhs._modifications))
            {
                ivarsEqual = false;
            }
            if (!(_objectType.Equals(rhs._objectType)))
            {
                ivarsEqual = false;
            }
            if (!(_objectLocation.Equals(rhs._objectLocation)))
            {
                ivarsEqual = false;
            }
            if (!(_objectOrientation.Equals(rhs._objectOrientation)))
            {
                ivarsEqual = false;
            }
            if (!(_objectAppearance == rhs._objectAppearance))
            {
                ivarsEqual = false;
            }
            if (!(_requesterID.Equals(rhs._requesterID)))
            {
                ivarsEqual = false;
            }
            if (!(_receivingID.Equals(rhs._receivingID)))
            {
                ivarsEqual = false;
            }
            if (!(_pad2 == rhs._pad2))
            {
                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(PointObjectStatePdu rhs)
        {
            bool ivarsEqual = true;

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

             if( ! (_objectID.Equals( rhs._objectID) )) ivarsEqual = false;
             if( ! (_referencedObjectID.Equals( rhs._referencedObjectID) )) ivarsEqual = false;
             if( ! (_updateNumber == rhs._updateNumber)) ivarsEqual = false;
             if( ! (_forceID == rhs._forceID)) ivarsEqual = false;
             if( ! (_modifications == rhs._modifications)) ivarsEqual = false;
             if( ! (_objectType.Equals( rhs._objectType) )) ivarsEqual = false;
             if( ! (_objectLocation.Equals( rhs._objectLocation) )) ivarsEqual = false;
             if( ! (_objectOrientation.Equals( rhs._objectOrientation) )) ivarsEqual = false;
             if( ! (_objectAppearance == rhs._objectAppearance)) ivarsEqual = false;
             if( ! (_requesterID.Equals( rhs._requesterID) )) ivarsEqual = false;
             if( ! (_receivingID.Equals( rhs._receivingID) )) ivarsEqual = false;
             if( ! (_pad2 == rhs._pad2)) ivarsEqual = false;

            return ivarsEqual;
        }