@Test public void testHashcode() { String paramsA1 = "param"; String paramsA2 = "param"; Long paramsB = 5L; ActionRequestImpl<String> rqst1 = new ActionRequestImpl<String>("action1", paramsA1); ActionRequestImpl<String> rqst2 = new ActionRequestImpl<String>("action1", paramsA2); ActionRequestImpl<String> rqst3 = new ActionRequestImpl<String>("action2", paramsB); assertEquals("Equal actions should have same hashcode", rqst1.hashCode(), rqst2.hashCode()); assertTrue("Unrelated actions should have different hashcodes.", rqst1.hashCode() != rqst3.hashCode()); }
@Override public int hashCode() { return actionKey.hashCode(); }
ActionRequestImpl implements Serializable, ActionRequest<T> { @Override public int hashCode() { return actionKey.hashCode(); } }
ActionRequestImpl implements Serializable, ActionRequest<T> { @Override public int hashCode() { return actionKey.hashCode(); } ActionRequestImpl();  ActionRequestImpl(final String inActionKey, final Serializable inParam); }
ActionRequestImpl implements Serializable, ActionRequest<T> { @Override public int hashCode() { return actionKey.hashCode(); } ActionRequestImpl();  ActionRequestImpl(final String inActionKey, final Serializable inParam); int getId(); void setId(final int inId); String getActionKey(); void setActionKey(final String inActionKey); Serializable getParam(); void setParam(final Serializable inParam); T getResponse(); void setResponse(final T inResponse); @SuppressWarnings("rawtypes") @Override boolean equals(final Object other); @Override int hashCode(); String getSessionId(); void setSessionId(final String inSessionId); }
ActionRequestImpl implements Serializable, ActionRequest<T> { @Override public int hashCode() { return actionKey.hashCode(); } ActionRequestImpl();  ActionRequestImpl(final String inActionKey, final Serializable inParam); int getId(); void setId(final int inId); String getActionKey(); void setActionKey(final String inActionKey); Serializable getParam(); void setParam(final Serializable inParam); T getResponse(); void setResponse(final T inResponse); @SuppressWarnings("rawtypes") @Override boolean equals(final Object other); @Override int hashCode(); String getSessionId(); void setSessionId(final String inSessionId);  }