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

The following examples show how to use org.apache.commons.lang3.builder.EqualsBuilder#build() . 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: AccountEntry.java    From jpa-unit with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof AccountEntry)) {
        return false;
    }
    final AccountEntry other = (AccountEntry) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(date, other.date);
    builder.append(reference, other.reference);
    builder.append(details, other.details);
    builder.append(amount, other.amount);
    builder.append(type, other.type);
    return builder.build();
}
 
Example 2
Source File: AccountEntry.java    From jpa-unit with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof AccountEntry)) {
        return false;
    }
    final AccountEntry other = (AccountEntry) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(date, other.date);
    builder.append(reference, other.reference);
    builder.append(details, other.details);
    builder.append(amount, other.amount);
    builder.append(type, other.type);
    return builder.build();
}
 
Example 3
Source File: AccountEntry.java    From jpa-unit with Apache License 2.0 6 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof AccountEntry)) {
        return false;
    }
    final AccountEntry other = (AccountEntry) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(date, other.date);
    builder.append(reference, other.reference);
    builder.append(details, other.details);
    builder.append(amount, other.amount);
    builder.append(type, other.type);
    return builder.build();
}
 
Example 4
Source File: DynamoDbDelegate.java    From dynamodb-janusgraph-storage-backend with Apache License 2.0 6 votes vote down vote up
private static boolean areGsisSameConfiguration(final GlobalSecondaryIndexDescription g1, final GlobalSecondaryIndexDescription g2) {
    if (g1 == null ^ g2 == null) {
        return false;
    }
    if (g1 == g2) {
        return true;
    }
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(g1.getIndexName(), g2.getIndexName());
    builder.append(g1.getKeySchema(), g2.getKeySchema());
    builder.append(g1.getProjection().getProjectionType(), g2.getProjection().getProjectionType());
    builder.append(g1.getProvisionedThroughput().getReadCapacityUnits(), g2.getProvisionedThroughput().getReadCapacityUnits());
    builder.append(g1.getProvisionedThroughput().getWriteCapacityUnits(), g2.getProvisionedThroughput().getWriteCapacityUnits());

    final Set<String> projectionNonKeyAttributesG1 =
        new HashSet<>(Optional.ofNullable(g1.getProjection().getNonKeyAttributes()).orElse(Collections.emptyList()));
    final Set<String> projectionNonKeyAttributesG2 =
        new HashSet<>(Optional.ofNullable(g2.getProjection().getNonKeyAttributes()).orElse(Collections.emptyList()));
    builder.append(projectionNonKeyAttributesG1, projectionNonKeyAttributesG2);

    return builder.build();
}
 
Example 5
Source File: IvaratorReloadTest.java    From datawave with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object other) {
    if (other instanceof IvaratorDirState) {
        IvaratorDirState state = (IvaratorDirState) other;
        EqualsBuilder builder = new EqualsBuilder().append(complete, state.complete).append(sortedSetBytes, state.sortedSetBytes)
                        .append(sortedSetDates, state.sortedSetDates);
        return builder.build();
    }
    return false;
}
 
Example 6
Source File: Address.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof Address)) {
        return false;
    }
    final Address other = (Address) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(street, other.street);
    builder.append(zipCode, other.zipCode);
    builder.append(city, other.city);
    builder.append(country, other.country);
    return builder.build();
}
 
Example 7
Source File: ContactDetail.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof ContactDetail)) {
        return false;
    }

    final ContactDetail other = (ContactDetail) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(type, other.type);
    builder.append(value, other.value);
    return builder.build();
}
 
Example 8
Source File: Address.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof Address)) {
        return false;
    }
    final Address other = (Address) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(street, other.street);
    builder.append(zipCode, other.zipCode);
    builder.append(city, other.city);
    builder.append(country, other.country);
    return builder.build();
}
 
Example 9
Source File: ContactDetail.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof ContactDetail)) {
        return false;
    }

    final ContactDetail other = (ContactDetail) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(type, other.type);
    builder.append(value, other.value);
    return builder.build();
}
 
Example 10
Source File: Address.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof Address)) {
        return false;
    }
    final Address other = (Address) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(street, other.street);
    builder.append(zipCode, other.zipCode);
    builder.append(city, other.city);
    builder.append(country, other.country);
    return builder.build();
}
 
Example 11
Source File: ContactDetail.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof ContactDetail)) {
        return false;
    }

    final ContactDetail other = (ContactDetail) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(type, other.type);
    builder.append(value, other.value);
    return builder.build();
}
 
Example 12
Source File: Address.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof Address)) {
        return false;
    }
    final Address other = (Address) obj;
    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(street, other.street);
    builder.append(zipCode, other.zipCode);
    builder.append(city, other.city);
    builder.append(country, other.country);
    return builder.build();
}
 
Example 13
Source File: ContactDetail.java    From jpa-unit with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(final Object obj) {
    if (obj == this) {
        return true;
    } else if (!(obj instanceof ContactDetail)) {
        return false;
    }

    final ContactDetail other = (ContactDetail) obj;

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(type, other.type);
    builder.append(value, other.value);
    return builder.build();
}