@Test public void testHashCode() { final SimpleId entityId = new SimpleId( "test" ); final UUID version = UUIDGenerator.newTimeUUID(); final Stage stage = Stage.COMPLETE; final MvccLogEntry.State state = MvccLogEntry.State.COMPLETE; MvccLogEntry first = new MvccLogEntryImpl( entityId, version, stage, state ); MvccLogEntry second = new MvccLogEntryImpl( entityId, version, stage, state ); assertEquals( first.hashCode(), second.hashCode() ); }
@Override public int hashCode() { int result = 31 * entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + stage.hashCode(); return result; }
MvccLogEntryImpl implements MvccLogEntry { @Override public int hashCode() { int result = 31 * entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + stage.hashCode(); return result; } }
MvccLogEntryImpl implements MvccLogEntry { @Override public int hashCode() { int result = 31 * entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + stage.hashCode(); return result; } MvccLogEntryImpl( final Id entityId, final UUID version, final Stage stage, final State state ); }
MvccLogEntryImpl implements MvccLogEntry { @Override public int hashCode() { int result = 31 * entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + stage.hashCode(); return result; } MvccLogEntryImpl( final Id entityId, final UUID version, final Stage stage, final State state ); @Override Stage getStage(); @Override Id getEntityId(); @Override UUID getVersion(); @Override State getState(); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString(); }
MvccLogEntryImpl implements MvccLogEntry { @Override public int hashCode() { int result = 31 * entityId.hashCode(); result = 31 * result + version.hashCode(); result = 31 * result + stage.hashCode(); return result; } MvccLogEntryImpl( final Id entityId, final UUID version, final Stage stage, final State state ); @Override Stage getStage(); @Override Id getEntityId(); @Override UUID getVersion(); @Override State getState(); @Override boolean equals( final Object o ); @Override int hashCode(); @Override String toString();  }