@Test public void testHashCode() { JmsProducerId id1 = new JmsProducerId(firstId, 1); JmsProducerId id2 = new JmsProducerId(secondId, 1); assertEquals(id1.hashCode(), id1.hashCode()); assertEquals(id2.hashCode(), id2.hashCode()); assertFalse(id1.hashCode() == id2.hashCode()); }
@Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (sessionId ^ (sessionId >>> 32)); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; }
JmsProducerId extends JmsAbstractResourceId implements Comparable<JmsProducerId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (sessionId ^ (sessionId >>> 32)); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; } }
JmsProducerId extends JmsAbstractResourceId implements Comparable<JmsProducerId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (sessionId ^ (sessionId >>> 32)); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; } JmsProducerId(JmsSessionId sessionId, long producerId);  JmsProducerId(JmsProducerId id);  JmsProducerId(String connectionId, long sessionId, long producerId);  JmsProducerId(String producerKey); }
JmsProducerId extends JmsAbstractResourceId implements Comparable<JmsProducerId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (sessionId ^ (sessionId >>> 32)); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; } JmsProducerId(JmsSessionId sessionId, long producerId);  JmsProducerId(JmsProducerId id);  JmsProducerId(String connectionId, long sessionId, long producerId);  JmsProducerId(String producerKey); JmsSessionId getParentId(); String getConnectionId(); long getValue(); long getSessionId(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object o); @Override int compareTo(JmsProducerId other); }
JmsProducerId extends JmsAbstractResourceId implements Comparable<JmsProducerId> { @Override public int hashCode() { if (hashCode == 0) { hashCode = 1; hashCode = 31 * hashCode + connectionId.hashCode(); hashCode = 31 * hashCode + (int) (sessionId ^ (sessionId >>> 32)); hashCode = 31 * hashCode + (int) (value ^ (value >>> 32)); } return hashCode; } JmsProducerId(JmsSessionId sessionId, long producerId);  JmsProducerId(JmsProducerId id);  JmsProducerId(String connectionId, long sessionId, long producerId);  JmsProducerId(String producerKey); JmsSessionId getParentId(); String getConnectionId(); long getValue(); long getSessionId(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object o); @Override int compareTo(JmsProducerId other);  }