Search in sources :

Example 36 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project vladmihalcea.wordpress.com by vladmihalcea.

the class Version method equals.

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof Version)) {
        return false;
    }
    Version that = (Version) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(type, that.getType());
    eb.append(image, that.getImage());
    return eb.isEquals();
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 37 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project vladmihalcea.wordpress.com by vladmihalcea.

the class Company method equals.

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof Company)) {
        return false;
    }
    Company that = (Company) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(name, that.name);
    return eb.isEquals();
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 38 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project vladmihalcea.wordpress.com by vladmihalcea.

the class Image method equals.

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof Image)) {
        return false;
    }
    Image that = (Image) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(name, that.name);
    eb.append(product, that.product);
    return eb.isEquals();
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 39 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project vladmihalcea.wordpress.com by vladmihalcea.

the class BagBranch method equals.

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof BagBranch)) {
        return false;
    }
    BagBranch that = (BagBranch) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(index, that.index);
    return eb.isEquals();
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 40 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project symmetric-ds by JumpMind.

the class Column method equals.

/**
 * {@inheritDoc}
 */
public boolean equals(Object obj) {
    if (obj instanceof Column) {
        Column other = (Column) obj;
        EqualsBuilder comparator = new EqualsBuilder();
        // Note that this compares case sensitive
        comparator.append(name, other.name);
        comparator.append(primaryKey, other.primaryKey);
        comparator.append(required, other.required);
        comparator.append(autoIncrement, other.autoIncrement);
        comparator.append(mappedTypeCode, other.mappedTypeCode);
        comparator.append(getParsedDefaultValue(), other.getParsedDefaultValue());
        // relevant
        if ((mappedTypeCode == Types.NUMERIC) || (mappedTypeCode == Types.DECIMAL)) {
            comparator.append(size, other.size);
            comparator.append(scale, other.scale);
        } else if ((mappedTypeCode == Types.CHAR) || (mappedTypeCode == Types.VARCHAR) || (mappedTypeCode == Types.BINARY) || (mappedTypeCode == Types.VARBINARY)) {
            comparator.append(size, other.size);
        }
        return comparator.isEquals();
    } else {
        return false;
    }
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Aggregations

EqualsBuilder (org.apache.commons.lang.builder.EqualsBuilder)95 ZooKeeper (org.apache.zookeeper.ZooKeeper)1 Product (org.candlepin.model.Product)1 AbstractStepMeta (org.pentaho.di.core.util.AbstractStepMeta)1 IPentahoRole (org.pentaho.platform.api.engine.security.userroledao.IPentahoRole)1 IPentahoUser (org.pentaho.platform.api.engine.security.userroledao.IPentahoUser)1