Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }

            Attack other = (Attack)obj;

            /*
             * return new EqualsBuilder().
             *      append(user, other.getUser()).
             *      append(detectionPoint, other.getDetectionPoint()).
             *      append(timestamp, other.getTimestamp()).
             *      append(detectionSystemId, other.getDetectionSystemId()).
             *      append(resource, other.getResource()).
             *      isEquals();
             */

            if (user.Equals(other.GetUser()) &&
                detectionPoint.Equals(other.GetDetectionPoint()) &&
                timestamp.Equals(other.GetTimestamp()) &&
                detectionSystemId.Equals(other.GetDetectionSystemId()) &&
                resource.Equals(other.getResource()))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }