@Override public int hashCode() { int result = (enabled ? 1 : 0); result = 31 * result + (json != null ? json.hashCode() : 0); return result; }
@Override public int hashCode() { int result = config != null ? config.hashCode() : 0; result = 31 * result + (worker ? 1 : 0); result = 31 * result + (isolationGroup != null ? isolationGroup.hashCode() : 0); result = 31 * result + (ha ? 1 : 0); result = 31 * result + (extraClasspath != null ? extraClasspath.hashCode() : 0); result = 31 * result + instances; result = 31 * result + (isolatedClasses != null ? isolatedClasses.hashCode() : 0); result = 31 * result + (workerPoolName != null ? workerPoolName.hashCode() : 0); result = 31 * result + workerPoolSize; result = 31 * result + Long.hashCode(maxWorkerExecuteTime); return result; } }
@Override public int hashCode() { int result = (enabled ? 1 : 0); result = 31 * result + (json != null ? json.hashCode() : 0); return result; }
@Override public int hashCode() { int result = config != null ? config.hashCode() : 0; result = 31 * result + (worker ? 1 : 0); result = 31 * result + (multiThreaded ? 1 : 0); result = 31 * result + (isolationGroup != null ? isolationGroup.hashCode() : 0); result = 31 * result + (ha ? 1 : 0); result = 31 * result + (extraClasspath != null ? extraClasspath.hashCode() : 0); result = 31 * result + instances; result = 31 * result + (isolatedClasses != null ? isolatedClasses.hashCode() : 0); result = 31 * result + (workerPoolName != null ? workerPoolName.hashCode() : 0); result = 31 * result + workerPoolSize; result = 31 * result + Long.hashCode(maxWorkerExecuteTime); return result; } }
/** * The hash code of the query result. * <p> * Result is lazy-loaded on the first call, then cached. * * @return the hash code */ @Override public int hashCode() { int result = hashCode; if (result == 0) { result = 17; result = 31 * result + (data == null ? 0 : data.hashCode()); result = 31 * result + (succeeded ? 1 : 0); result = 31 * result + (errors == null ? 0 : errors.hashCode()); hashCode = result; } return result; }
/** * @return the hash code of the current service record */ @Override public int hashCode() { int result = 17; result = 31 * result + (name == null ? 0 : name.hashCode()); result = 31 * result + (type == null ? 0 : type.hashCode()); result = 31 * result + (location == null ? 0 : location.hashCode()); result = 31 * result + (metadata == null ? 0 : metadata.hashCode()); result = 31 * result + (registration == null ? 0 : registration.hashCode()); result = 31 * result + (status == null ? 0 : status.hashCode()); return result; } }
/** * @return the hash code of the current service record */ @Override public int hashCode() { int result = 17; result = 31 * result + (name == null ? 0 : name.hashCode()); result = 31 * result + (type == null ? 0 : type.hashCode()); result = 31 * result + (location == null ? 0 : location.hashCode()); result = 31 * result + (metadata == null ? 0 : metadata.hashCode()); result = 31 * result + (registration == null ? 0 : registration.hashCode()); result = 31 * result + (status == null ? 0 : status.hashCode()); return result; } }
@Test public void testUnequality(final TestContext context) { final TopicPartition t1 = new TopicPartition("topic1", 0); final TopicPartition t2 = new TopicPartition("topic1", 1); final TopicPartition t3 = new TopicPartition("topic2", 0); final TopicPartition t4 = new TopicPartition("topic2", 1); final JsonObject t5 = new JsonObject(); context.assertNotEquals(t1, t2); context.assertNotEquals(t1.hashCode(), t2.hashCode()); context.assertNotEquals(t3, t4); context.assertNotEquals(t3.hashCode(), t4.hashCode()); context.assertNotEquals(t3, t5); context.assertNotEquals(t3.hashCode(), t5.hashCode()); context.assertFalse(t1.equals(null)); context.assertFalse(t1.equals(t5)); } }
@Test public void testUnequality(final TestContext context) { final TopicPartition t1 = new TopicPartition("topic1", 0); final TopicPartition t2 = new TopicPartition("topic1", 1); final TopicPartition t3 = new TopicPartition("topic2", 0); final TopicPartition t4 = new TopicPartition("topic2", 1); final JsonObject t5 = new JsonObject(); context.assertNotEquals(t1, t2); context.assertNotEquals(t1.hashCode(), t2.hashCode()); context.assertNotEquals(t3, t4); context.assertNotEquals(t3.hashCode(), t4.hashCode()); context.assertNotEquals(t3, t5); context.assertNotEquals(t3.hashCode(), t5.hashCode()); context.assertFalse(t1.equals(null)); context.assertFalse(t1.equals(t5)); } }