@Test public void testEqualsCode() { JmsSessionInfo first = new JmsSessionInfo(firstId); JmsSessionInfo second = new JmsSessionInfo(secondId); assertEquals(first, first); assertEquals(second, second); assertFalse(first.equals(second)); assertFalse(second.equals(first)); assertFalse(first.equals(null)); assertFalse(second.equals("test")); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsSessionInfo other = (JmsSessionInfo) obj; return sessionId.equals(other.sessionId); }
JmsSessionInfo extends JmsAbstractResource implements Comparable<JmsSessionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsSessionInfo other = (JmsSessionInfo) obj; return sessionId.equals(other.sessionId); } }
JmsSessionInfo extends JmsAbstractResource implements Comparable<JmsSessionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsSessionInfo other = (JmsSessionInfo) obj; return sessionId.equals(other.sessionId); } JmsSessionInfo(JmsConnectionInfo connectionInfo, long sessionId);  JmsSessionInfo(JmsSessionId sessionId); }
JmsSessionInfo extends JmsAbstractResource implements Comparable<JmsSessionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsSessionInfo other = (JmsSessionInfo) obj; return sessionId.equals(other.sessionId); } JmsSessionInfo(JmsConnectionInfo connectionInfo, long sessionId);  JmsSessionInfo(JmsSessionId sessionId); JmsSessionInfo copy(); @Override JmsSessionId getId(); @Override void visit(JmsResourceVistor vistor); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); boolean isTransacted(); boolean isSendAcksAsync(); void setSendAcksAsync(boolean sendAcksAsync); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsSessionInfo other); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); }
JmsSessionInfo extends JmsAbstractResource implements Comparable<JmsSessionInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsSessionInfo other = (JmsSessionInfo) obj; return sessionId.equals(other.sessionId); } JmsSessionInfo(JmsConnectionInfo connectionInfo, long sessionId);  JmsSessionInfo(JmsSessionId sessionId); JmsSessionInfo copy(); @Override JmsSessionId getId(); @Override void visit(JmsResourceVistor vistor); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); boolean isTransacted(); boolean isSendAcksAsync(); void setSendAcksAsync(boolean sendAcksAsync); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsSessionInfo other); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy);  }