@Test public void testCompareTo() { JmsTransactionId id1 = new JmsTransactionId(firstId, 1); JmsTransactionId id2 = new JmsTransactionId(secondId, 2); assertEquals(-1, id1.compareTo(id2)); assertEquals(0, id1.compareTo(id1)); assertEquals(1, id2.compareTo(id1)); }
@Override public int compareTo(JmsTransactionId o) { int result = connectionId.compareTo(o.connectionId); if (result == 0) { result = (int)(value - o.value); } return result; }
JmsTransactionId extends JmsAbstractResourceId implements Comparable<JmsTransactionId> { @Override public int compareTo(JmsTransactionId o) { int result = connectionId.compareTo(o.connectionId); if (result == 0) { result = (int)(value - o.value); } return result; } }
JmsTransactionId extends JmsAbstractResourceId implements Comparable<JmsTransactionId> { @Override public int compareTo(JmsTransactionId o) { int result = connectionId.compareTo(o.connectionId); if (result == 0) { result = (int)(value - o.value); } return result; } JmsTransactionId(JmsConnectionId connectionId, long transactionId); }
JmsTransactionId extends JmsAbstractResourceId implements Comparable<JmsTransactionId> { @Override public int compareTo(JmsTransactionId o) { int result = connectionId.compareTo(o.connectionId); if (result == 0) { result = (int)(value - o.value); } return result; } JmsTransactionId(JmsConnectionId connectionId, long transactionId); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); @Override int compareTo(JmsTransactionId o); Object getProviderTxId(); long getValue(); JmsConnectionId getConnectionId(); }
JmsTransactionId extends JmsAbstractResourceId implements Comparable<JmsTransactionId> { @Override public int compareTo(JmsTransactionId o) { int result = connectionId.compareTo(o.connectionId); if (result == 0) { result = (int)(value - o.value); } return result; } JmsTransactionId(JmsConnectionId connectionId, long transactionId); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); @Override int compareTo(JmsTransactionId o); Object getProviderTxId(); long getValue(); JmsConnectionId getConnectionId();  }