public boolean equals()

in src/main/java/org/opensearch/ad/model/DetectorProfile.java [360:407]


    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        if (obj instanceof DetectorProfile) {
            DetectorProfile other = (DetectorProfile) obj;

            EqualsBuilder equalsBuilder = new EqualsBuilder();
            if (state != null) {
                equalsBuilder.append(state, other.state);
            }
            if (error != null) {
                equalsBuilder.append(error, other.error);
            }
            if (modelProfile != null && modelProfile.length > 0) {
                equalsBuilder.append(modelProfile, other.modelProfile);
            }
            if (shingleSize != -1) {
                equalsBuilder.append(shingleSize, other.shingleSize);
            }
            if (coordinatingNode != null) {
                equalsBuilder.append(coordinatingNode, other.coordinatingNode);
            }
            if (totalSizeInBytes != -1) {
                equalsBuilder.append(totalSizeInBytes, other.totalSizeInBytes);
            }
            if (initProgress != null) {
                equalsBuilder.append(initProgress, other.initProgress);
            }
            if (totalEntities != null) {
                equalsBuilder.append(totalEntities, other.totalEntities);
            }
            if (activeEntities != null) {
                equalsBuilder.append(activeEntities, other.activeEntities);
            }
            if (adTaskProfile != null) {
                equalsBuilder.append(adTaskProfile, other.adTaskProfile);
            }
            if (modelCount > 0) {
                equalsBuilder.append(modelCount, other.modelCount);
            }
            return equalsBuilder.isEquals();
        }
        return false;
    }