/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(LinearObjectStatePdu 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 (!(_numberOfSegments == rhs._numberOfSegments)) { ivarsEqual = false; } if (!(_requesterID.Equals(rhs._requesterID))) { ivarsEqual = false; } if (!(_receivingID.Equals(rhs._receivingID))) { ivarsEqual = false; } if (!(_objectType.Equals(rhs._objectType))) { ivarsEqual = false; } for (int idx = 0; idx < _linearSegmentParameters.Count; idx++) { LinearSegmentParameter x = (LinearSegmentParameter)_linearSegmentParameters[idx]; if (!(_linearSegmentParameters[idx].Equals(rhs._linearSegmentParameters[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(LinearObjectStatePdu 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( ! (_numberOfSegments == rhs._numberOfSegments)) ivarsEqual = false; if( ! (_requesterID.Equals( rhs._requesterID) )) ivarsEqual = false; if( ! (_receivingID.Equals( rhs._receivingID) )) ivarsEqual = false; if( ! (_objectType.Equals( rhs._objectType) )) ivarsEqual = false; for(int idx = 0; idx < _linearSegmentParameters.Count; idx++) { LinearSegmentParameter x = (LinearSegmentParameter)_linearSegmentParameters[idx]; if( ! ( _linearSegmentParameters[idx].Equals(rhs._linearSegmentParameters[idx]))) ivarsEqual = false; } return ivarsEqual; }