Java Code Examples for org.apache.commons.lang3.builder.EqualsBuilder#isEquals()

The following examples show how to use org.apache.commons.lang3.builder.EqualsBuilder#isEquals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PrimitiveType.java    From org.hl7.fhir.core with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equalsDeep(Base obj) {
	if (!super.equalsDeep(obj))
		return false;
	if (obj == null) {
		return false;
	}
	if (!(obj.getClass() == getClass())) {
		return false;
	}

	PrimitiveType<?> o = (PrimitiveType<?>) obj;

	EqualsBuilder b = new EqualsBuilder();
	b.append(getValue(), o.getValue());
	return b.isEquals();
}
 
Example 2
Source File: AbstractLayer.java    From jstarcraft-ai with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }
    if (object == null) {
        return false;
    }
    if (getClass() != object.getClass()) {
        return false;
    } else {
        AbstractLayer that = (AbstractLayer) object;
        EqualsBuilder equal = new EqualsBuilder();
        equal.append(this.numberOfInputs, that.numberOfInputs);
        equal.append(this.numberOfOutputs, that.numberOfOutputs);
        equal.append(this.configurators, that.configurators);
        equal.append(this.parameters, that.parameters);
        equal.append(this.function, that.function);
        return equal.isEquals();
    }
}
 
Example 3
Source File: SearchLookupResponse.java    From timely with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (null == obj) {
        return false;
    }
    if (this == obj) {
        return true;
    }
    if (obj instanceof Result) {
        Result other = (Result) obj;
        EqualsBuilder builder = new EqualsBuilder();
        builder.append(this.metric, other.metric);
        builder.append(this.tsuid, other.tsuid);
        builder.append(this.tags, other.tags);
        return builder.isEquals();
    } else {
        return false;
    }
}
 
Example 4
Source File: MockObject.java    From jstarcraft-core with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (!(object instanceof MockObject))
        return false;
    MockObject that = (MockObject) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.getId(), that.getId());
    equal.append(this.getName(), that.getName());
    equal.append(this.getMoney(), that.getMoney());
    equal.append(this.getRace(), that.getRace());
    return equal.isEquals();
}
 
Example 5
Source File: AbstractOptimizer.java    From jstarcraft-ai with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }
    if (object == null) {
        return false;
    }
    if (getClass() != object.getClass()) {
        return false;
    } else {
        AbstractOptimizer that = (AbstractOptimizer) object;
        EqualsBuilder equal = new EqualsBuilder();
        equal.append(this.stepFunction, that.stepFunction);
        equal.append(this.conditions, that.conditions);
        return equal.isEquals();
    }
}
 
Example 6
Source File: StepSchedule.java    From jstarcraft-ai with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }
    if (object == null) {
        return false;
    }
    if (getClass() != object.getClass()) {
        return false;
    } else {
        StepSchedule that = (StepSchedule) object;
        EqualsBuilder equal = new EqualsBuilder();
        equal.append(this.scheduleType, that.scheduleType);
        equal.append(this.initialValue, that.initialValue);
        equal.append(this.decayRate, that.decayRate);
        equal.append(this.step, that.step);
        return equal.isEquals();
    }
}
 
Example 7
Source File: IssuesTableRow.java    From warnings-ng-plugin with MIT License 6 votes vote down vote up
@Override
public boolean equals(final Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    IssuesTableRow that = (IssuesTableRow) o;

    EqualsBuilder builder = new EqualsBuilder();
    builder.append(this.getAge(), that.getAge())
            .append(this.getFileName(), that.getFileName())
            .append(this.getLineNumber(), that.getLineNumber())
            .append(this.getPackageName(), that.getPackageName())
            .append(this.getSeverity(), that.getSeverity());
    return builder.isEquals();
}
 
Example 8
Source File: Pack.java    From jstarcraft-core with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (!(object instanceof Pack))
        return false;
    Pack that = (Pack) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.getId(), that.getId());
    equal.append(this.getItems(), that.getItems());
    equal.append(this.getPersonId(), that.getPersonId());
    equal.append(this.getSize(), that.getSize());
    return equal.isEquals();
}
 
Example 9
Source File: Nd4jVector.java    From jstarcraft-ai with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    Nd4jVector that = (Nd4jVector) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.vector, that.vector);
    return equal.isEquals();
}
 
Example 10
Source File: ScriptScope.java    From jstarcraft-core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    ScriptScope that = (ScriptScope) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.scopeAttributes, that.scopeAttributes);
    return equal.isEquals();
}
 
Example 11
Source File: PackageProperty.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
public boolean equals(Object obj) {
    if (!(obj instanceof PackageProperty)) {
        return false;
    }
    PackageProperty prop = (PackageProperty) obj;
    EqualsBuilder eq = new EqualsBuilder();
    eq.append(this.getSense(), prop.getSense());
    eq.append(this.getPack(), prop.getPack());
    eq.append(this.getCapability(), prop.getCapability());
    return eq.isEquals();
}
 
Example 12
Source File: AssessmentGradingData.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	AssessmentGradingData other = (AssessmentGradingData) obj;
       EqualsBuilder builder = new EqualsBuilder();
    builder.appendSuper(super.equals(obj));
    builder.append(agentId,other.agentId);
    builder.append(assessmentGradingId,other.assessmentGradingId);
    builder.append(attemptDate,other.attemptDate);
    builder.append(comments,other.comments);
    builder.append(finalScore,other.finalScore);
    builder.append(forGrade,other.forGrade);
    builder.append(gradedBy,other.gradedBy);
    builder.append(gradedDate,other.gradedDate);
    builder.append(isAutoSubmitted,other.isAutoSubmitted);
    builder.append(isLate,other.isLate);
    builder.append(isRecorded,other.isRecorded);
    builder.append(itemGradingSet,other.itemGradingSet);
    builder.append(lastVisitedPart,other.lastVisitedPart);
    builder.append(lastVisitedQuestion,other.lastVisitedQuestion);
    builder.append(publishedAssessmentId,other.publishedAssessmentId);
    builder.append(publishedAssessmentTitle,other.publishedAssessmentTitle);
    builder.append(publishedItemId,other.publishedItemId);
    builder.append(status,other.status);
    builder.append(submittedDate,other.submittedDate);
    builder.append(timeElapsed,other.timeElapsed);
    builder.append(totalAutoScore,other.totalAutoScore);
    builder.append(totalOverrideScore,other.totalOverrideScore);
    builder.append(totalSubmitted,other.totalSubmitted);
    return builder.isEquals();
}
 
Example 13
Source File: MockSimpleObject.java    From jstarcraft-core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    MockSimpleObject that = (MockSimpleObject) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.id, that.id);
    equal.append(this.name, that.name);
    return equal.isEquals();
}
 
Example 14
Source File: BerkeleyMetadata.java    From jstarcraft-core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    BerkeleyMetadata that = (BerkeleyMetadata) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.ormClass, that.ormClass);
    return equal.isEquals();
}
 
Example 15
Source File: MockObject.java    From jstarcraft-core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    MockObject that = (MockObject) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.id, that.id);
    equal.append(this.name, that.name);
    return equal.isEquals();
}
 
Example 16
Source File: HibernateApiFetchStrategyTest.java    From hibernate-master-class with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof Importer)) {
        return false;
    }
    Importer that = (Importer) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(name, that.getName());
    return eb.isEquals();
}
 
Example 17
Source File: MyBatisRegionObject.java    From jstarcraft-core with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (!(object instanceof MyBatisRegionObject))
        return false;
    MyBatisRegionObject that = (MyBatisRegionObject) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.getId(), that.getId());
    return equal.isEquals();
}
 
Example 18
Source File: HashMatrix.java    From jstarcraft-ai with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    HashMatrix that = (HashMatrix) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.keyValues, that.keyValues);
    return equal.isEquals();
}
 
Example 19
Source File: MockSimpleObject.java    From jstarcraft-ai with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    MockSimpleObject that = (MockSimpleObject) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.id, that.id);
    equal.append(this.name, that.name);
    return equal.isEquals();
}
 
Example 20
Source File: ArrayMatrix.java    From jstarcraft-ai with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object object) {
    if (this == object)
        return true;
    if (object == null)
        return false;
    if (getClass() != object.getClass())
        return false;
    ArrayMatrix that = (ArrayMatrix) object;
    EqualsBuilder equal = new EqualsBuilder();
    equal.append(this.vectors, that.vectors);
    return equal.isEquals();
}