Search in sources :

Example 31 with EqualsBuilder

use of org.apache.commons.lang3.builder.EqualsBuilder in project vcell by virtualcell.

the class ChomboSolverSpec method compareEqual.

public boolean compareEqual(Matchable object) {
    if (this == object) {
        return (true);
    }
    if (!(object instanceof ChomboSolverSpec)) {
        return false;
    }
    ChomboSolverSpec chomboSolverSpec = (ChomboSolverSpec) object;
    if (chomboSolverSpec.maxBoxSize != maxBoxSize) {
        return false;
    }
    if (!Compare.isEqual(chomboSolverSpec.viewLevel, viewLevel)) {
        return false;
    }
    if (chomboSolverSpec.fillRatio != fillRatio) {
        return false;
    }
    if (chomboSolverSpec.bSaveVCellOutput != bSaveVCellOutput) {
        return false;
    }
    if (chomboSolverSpec.bSaveChomboOutput != bSaveChomboOutput) {
        return false;
    }
    if (tagsGrow != chomboSolverSpec.tagsGrow) {
        return false;
    }
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    equalsBuilder.append(bActivateFeatureUnderDevelopment, chomboSolverSpec.bActivateFeatureUnderDevelopment).append(smallVolfracThreshold, chomboSolverSpec.smallVolfracThreshold).append(blockFactor, chomboSolverSpec.blockFactor);
    if (!equalsBuilder.isEquals()) {
        return false;
    }
    if (timeIntervalList.size() != chomboSolverSpec.timeIntervalList.size()) {
        return false;
    }
    for (int i = 0; i < timeIntervalList.size(); i++) {
        if (!timeIntervalList.get(i).compareEqual(chomboSolverSpec.timeIntervalList.get(i))) {
            return false;
        }
    }
    if (chomboSolverSpec.getNumRefinementLevels() != getNumRefinementLevels()) {
        return false;
    }
    if (chomboSolverSpec.refinementRoiList.size() != refinementRoiList.size()) {
        return false;
    }
    for (int i = 0; i < refinementRoiList.size(); i++) {
        if (!refinementRoiList.get(i).compareEqual(chomboSolverSpec.refinementRoiList.get(i))) {
            return false;
        }
    }
    return true;
}
Also used : EqualsBuilder(org.apache.commons.lang3.builder.EqualsBuilder)

Example 32 with EqualsBuilder

use of org.apache.commons.lang3.builder.EqualsBuilder in project cas by apereo.

the class AbstractCredential method equals.

@Override
public boolean equals(final Object other) {
    if (other == null) {
        return false;
    }
    if (!(other instanceof Credential)) {
        return false;
    }
    if (other == this) {
        return true;
    }
    val builder = new EqualsBuilder();
    builder.append(getId(), ((Credential) other).getId());
    return builder.isEquals();
}
Also used : lombok.val(lombok.val) Credential(org.apereo.cas.authentication.Credential) EqualsBuilder(org.apache.commons.lang3.builder.EqualsBuilder)

Example 33 with EqualsBuilder

use of org.apache.commons.lang3.builder.EqualsBuilder in project stargate-core by tuplejump.

the class Tuple method equals.

@Override
public boolean equals(Object obj) {
    Tuple other = ((Tuple) obj);
    if (tuple == null && other.tuple == null)
        return true;
    EqualsBuilder equalsBuilder = new EqualsBuilder();
    for (int i = 0; i < tuple.length; i++) {
        equalsBuilder.append(tuple[i], other.tuple[i]);
    }
    return equalsBuilder.build();
}
Also used : EqualsBuilder(org.apache.commons.lang3.builder.EqualsBuilder)

Example 34 with EqualsBuilder

use of org.apache.commons.lang3.builder.EqualsBuilder in project open-kilda by telstra.

the class MeterSchemaBand method equals.

@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    MeterSchemaBand that = (MeterSchemaBand) o;
    EqualsBuilder equals = new EqualsBuilder().append(type, that.type);
    if (inaccurate || that.inaccurate) {
        return equals.isEquals() && isEqualOrWithinDeviation(rate, that.rate, INACCURATE_RATE_ALLOWED_DEVIATION, INACCURATE_RATE_ALLOWED_RELATIVE_DEVIATION) && isEqualOrWithinDeviation(burstSize, that.burstSize, INACCURATE_BURST_ALLOWED_DEVIATION, INACCURATE_BURST_ALLOWED_RELATIVE_DEVIATION);
    } else {
        return equals.append(rate, that.rate).isEquals() && inaccurateEquals(burstSize, that.burstSize, ACCURATE_BURST_ALLOWED_DEVIATION);
    }
}
Also used : EqualsBuilder(org.apache.commons.lang3.builder.EqualsBuilder)

Aggregations

EqualsBuilder (org.apache.commons.lang3.builder.EqualsBuilder)34 lombok.val (lombok.val)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Credential (org.apereo.cas.authentication.Credential)1 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)1