Пример #1
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(ArealObjectStatePdu 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 (!(_objectAppearance.Equals(rhs._objectAppearance)))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfPoints == rhs._numberOfPoints))
            {
                ivarsEqual = false;
            }
            if (!(_requesterID.Equals(rhs._requesterID)))
            {
                ivarsEqual = false;
            }
            if (!(_receivingID.Equals(rhs._receivingID)))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _objectLocation.Count; idx++)
            {
                Vector3Double x = (Vector3Double)_objectLocation[idx];
                if (!(_objectLocation[idx].Equals(rhs._objectLocation[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(ArealObjectStatePdu 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( ! (_objectAppearance.Equals( rhs._objectAppearance) )) ivarsEqual = false;
             if( ! (_numberOfPoints == rhs._numberOfPoints)) ivarsEqual = false;
             if( ! (_requesterID.Equals( rhs._requesterID) )) ivarsEqual = false;
             if( ! (_receivingID.Equals( rhs._receivingID) )) ivarsEqual = false;

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

            return ivarsEqual;
        }