@Test public void testHashCode() { JmsDefaultRedeliveryPolicy policy1 = new JmsDefaultRedeliveryPolicy(); JmsDefaultRedeliveryPolicy policy2 = new JmsDefaultRedeliveryPolicy(); assertEquals(policy1.hashCode(), policy2.hashCode()); policy1.setMaxRedeliveries(5); policy2.setMaxRedeliveries(6); assertFalse(policy1.hashCode() == policy2.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + maxRedeliveries; result = prime * result + outcome; return result; }
JmsDefaultRedeliveryPolicy implements JmsRedeliveryPolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + maxRedeliveries; result = prime * result + outcome; return result; } }
JmsDefaultRedeliveryPolicy implements JmsRedeliveryPolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + maxRedeliveries; result = prime * result + outcome; return result; } JmsDefaultRedeliveryPolicy();  JmsDefaultRedeliveryPolicy(JmsDefaultRedeliveryPolicy source); }
JmsDefaultRedeliveryPolicy implements JmsRedeliveryPolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + maxRedeliveries; result = prime * result + outcome; return result; } JmsDefaultRedeliveryPolicy();  JmsDefaultRedeliveryPolicy(JmsDefaultRedeliveryPolicy source); @Override JmsDefaultRedeliveryPolicy copy(); @Override int getMaxRedeliveries(JmsDestination destination); @Override int getOutcome(JmsDestination destination); int getOutcome(); void setOutcome(int outcome); void setOutcome(String outcome); int getMaxRedeliveries(); void setMaxRedeliveries(int maxRedeliveries); @Override int hashCode(); @Override boolean equals(Object obj); }
JmsDefaultRedeliveryPolicy implements JmsRedeliveryPolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + maxRedeliveries; result = prime * result + outcome; return result; } JmsDefaultRedeliveryPolicy();  JmsDefaultRedeliveryPolicy(JmsDefaultRedeliveryPolicy source); @Override JmsDefaultRedeliveryPolicy copy(); @Override int getMaxRedeliveries(JmsDestination destination); @Override int getOutcome(JmsDestination destination); int getOutcome(); void setOutcome(int outcome); void setOutcome(String outcome); int getMaxRedeliveries(); void setMaxRedeliveries(int maxRedeliveries); @Override int hashCode(); @Override boolean equals(Object obj); static final int DEFAULT_MAX_REDELIVERIES; static final int DEFAULT_OUTCOME; }