use of org.apache.commons.lang.builder.EqualsBuilder in project gora by apache.
the class QueryBase method equals.
@SuppressWarnings({ "rawtypes" })
@Override
public boolean equals(Object obj) {
if (obj instanceof QueryBase) {
QueryBase that = (QueryBase) obj;
EqualsBuilder builder = new EqualsBuilder();
builder.append(dataStore, that.dataStore);
builder.append(queryString, that.queryString);
builder.append(fields, that.fields);
builder.append(startKey, that.startKey);
builder.append(endKey, that.endKey);
builder.append(filter, that.filter);
builder.append(limit, that.limit);
builder.append(localFilterEnabled, that.localFilterEnabled);
return builder.isEquals();
}
return false;
}
use of org.apache.commons.lang.builder.EqualsBuilder in project pentaho-kettle by pentaho.
the class StepMetaTest method assertEquals.
private static void assertEquals(StepMeta meta, StepMeta another) {
assertTrue(EqualsBuilder.reflectionEquals(meta, another, false, StepMeta.class, new String[] { "location", "targetStepPartitioningMeta" }));
boolean manualCheck = new EqualsBuilder().append(meta.getLocation().x, another.getLocation().x).append(meta.getLocation().y, another.getLocation().y).isEquals();
assertTrue(manualCheck);
}
use of org.apache.commons.lang.builder.EqualsBuilder in project pentaho-platform by pentaho.
the class MockPentahoUser method equals.
public boolean equals(Object obj) {
if (obj instanceof MockPentahoUser == false) {
return false;
}
if (this == obj) {
return true;
}
MockPentahoUser rhs = (MockPentahoUser) obj;
boolean result;
if ((getTenant() == null) && (rhs.getTenant() == null)) {
result = new EqualsBuilder().append(userName, rhs.userName).isEquals();
} else {
result = new EqualsBuilder().append(userName, rhs.userName).append(tenant, rhs.tenant).isEquals();
}
return result;
}
use of org.apache.commons.lang.builder.EqualsBuilder in project googleads-java-lib by googleads.
the class DateTimesTest method assertEquals.
/**
* Asserts that two API date times are equal.
*/
private static void assertEquals(com.google.api.ads.admanager.jaxws.v202105.DateTime expected, com.google.api.ads.admanager.jaxws.v202105.DateTime actual) {
boolean equals = expected == actual || new EqualsBuilder().append(expected.getDate().getYear(), actual.getDate().getYear()).append(expected.getDate().getMonth(), actual.getDate().getMonth()).append(expected.getDate().getDay(), actual.getDate().getDay()).append(expected.getHour(), actual.getHour()).append(expected.getMinute(), actual.getMinute()).append(expected.getSecond(), actual.getSecond()).append(DateTimeZone.forTimeZone(TimeZone.getTimeZone(expected.getTimeZoneId())).toTimeZone().getRawOffset(), DateTimeZone.forTimeZone(TimeZone.getTimeZone(actual.getTimeZoneId())).toTimeZone().getRawOffset()).isEquals();
Assert.assertTrue(String.format("Expected: <%s> Actual: <%s>", toString(expected), toString(actual)), equals);
}
use of org.apache.commons.lang.builder.EqualsBuilder in project googleads-java-lib by googleads.
the class DateTimesTest method assertEquals.
/**
* Asserts that two API date times are equal.
*/
private static void assertEquals(com.google.api.ads.admanager.jaxws.v202202.DateTime expected, com.google.api.ads.admanager.jaxws.v202202.DateTime actual) {
boolean equals = expected == actual || new EqualsBuilder().append(expected.getDate().getYear(), actual.getDate().getYear()).append(expected.getDate().getMonth(), actual.getDate().getMonth()).append(expected.getDate().getDay(), actual.getDate().getDay()).append(expected.getHour(), actual.getHour()).append(expected.getMinute(), actual.getMinute()).append(expected.getSecond(), actual.getSecond()).append(DateTimeZone.forTimeZone(TimeZone.getTimeZone(expected.getTimeZoneId())).toTimeZone().getRawOffset(), DateTimeZone.forTimeZone(TimeZone.getTimeZone(actual.getTimeZoneId())).toTimeZone().getRawOffset()).isEquals();
Assert.assertTrue(String.format("Expected: <%s> Actual: <%s>", toString(expected), toString(actual)), equals);
}
Aggregations