@Test public void testHashCode(){ Shard shard1 = new Shard("test", "region", Shard.Type.DEFAULT, 10000000000L, null); Shard shard2 = new Shard("test", "region", Shard.Type.DEFAULT, 10000000000L, null); assertEquals(shard1.hashCode(), shard2.hashCode()); }
@Override public int hashCode() { int result = queueName.hashCode(); result = ( 31 * result ) + region.hashCode(); result = ( 31 * result ) + (int)shardId; result = ( 31 * result ) + type.hashCode(); return result; }
Shard { @Override public int hashCode() { int result = queueName.hashCode(); result = ( 31 * result ) + region.hashCode(); result = ( 31 * result ) + (int)shardId; result = ( 31 * result ) + type.hashCode(); return result; } }
Shard { @Override public int hashCode() { int result = queueName.hashCode(); result = ( 31 * result ) + region.hashCode(); result = ( 31 * result ) + (int)shardId; result = ( 31 * result ) + type.hashCode(); return result; } Shard(final String queueName, final String region, final Type type, final long shardId, UUID pointer); }
Shard { @Override public int hashCode() { int result = queueName.hashCode(); result = ( 31 * result ) + region.hashCode(); result = ( 31 * result ) + (int)shardId; result = ( 31 * result ) + type.hashCode(); return result; } Shard(final String queueName, final String region, final Type type, final long shardId, UUID pointer); String getQueueName(); String getRegion(); long getShardId(); Type getType(); UUID getPointer(); void setPointer(UUID pointer); @Override int hashCode(); @Override boolean equals(Object obj); }
Shard { @Override public int hashCode() { int result = queueName.hashCode(); result = ( 31 * result ) + region.hashCode(); result = ( 31 * result ) + (int)shardId; result = ( 31 * result ) + type.hashCode(); return result; } Shard(final String queueName, final String region, final Type type, final long shardId, UUID pointer); String getQueueName(); String getRegion(); long getShardId(); Type getType(); UUID getPointer(); void setPointer(UUID pointer); @Override int hashCode(); @Override boolean equals(Object obj);  }