@Test public void testHashCode() { JmsDefaultPresettlePolicy policy1 = new JmsDefaultPresettlePolicy(); JmsDefaultPresettlePolicy policy2 = new JmsDefaultPresettlePolicy(); assertEquals(policy1.hashCode(), policy2.hashCode()); policy1.setPresettleAll(false); policy2.setPresettleAll(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(false); policy1.setPresettleTopicProducers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(false); policy1.setPresettleTopicProducers(false); policy1.setPresettleQueueProducers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(false); policy1.setPresettleTopicProducers(false); policy1.setPresettleQueueProducers(false); policy1.setPresettleTransactedProducers(true); assertFalse(policy1.hashCode() == policy2.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (presettleAll ? 1231 : 1237); result = prime * result + (presettleConsumers ? 1231 : 1237); result = prime * result + (presettleProducers ? 1231 : 1237); result = prime * result + (presettleQueueConsumers ? 1231 : 1237); result = prime * result + (presettleQueueProducers ? 1231 : 1237); result = prime * result + (presettleTopicConsumers ? 1231 : 1237); result = prime * result + (presettleTopicProducers ? 1231 : 1237); result = prime * result + (presettleTransactedProducers ? 1231 : 1237); return result; }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (presettleAll ? 1231 : 1237); result = prime * result + (presettleConsumers ? 1231 : 1237); result = prime * result + (presettleProducers ? 1231 : 1237); result = prime * result + (presettleQueueConsumers ? 1231 : 1237); result = prime * result + (presettleQueueProducers ? 1231 : 1237); result = prime * result + (presettleTopicConsumers ? 1231 : 1237); result = prime * result + (presettleTopicProducers ? 1231 : 1237); result = prime * result + (presettleTransactedProducers ? 1231 : 1237); return result; } }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (presettleAll ? 1231 : 1237); result = prime * result + (presettleConsumers ? 1231 : 1237); result = prime * result + (presettleProducers ? 1231 : 1237); result = prime * result + (presettleQueueConsumers ? 1231 : 1237); result = prime * result + (presettleQueueProducers ? 1231 : 1237); result = prime * result + (presettleTopicConsumers ? 1231 : 1237); result = prime * result + (presettleTopicProducers ? 1231 : 1237); result = prime * result + (presettleTransactedProducers ? 1231 : 1237); return result; } JmsDefaultPresettlePolicy();  JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source); }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (presettleAll ? 1231 : 1237); result = prime * result + (presettleConsumers ? 1231 : 1237); result = prime * result + (presettleProducers ? 1231 : 1237); result = prime * result + (presettleQueueConsumers ? 1231 : 1237); result = prime * result + (presettleQueueProducers ? 1231 : 1237); result = prime * result + (presettleTopicConsumers ? 1231 : 1237); result = prime * result + (presettleTopicProducers ? 1231 : 1237); result = prime * result + (presettleTransactedProducers ? 1231 : 1237); return result; } JmsDefaultPresettlePolicy();  JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source); @Override JmsDefaultPresettlePolicy copy(); @Override boolean isConsumerPresttled(JmsSession session, JmsDestination destination); @Override boolean isProducerPresttled(JmsSession session, JmsDestination destination); boolean isPresettleAll(); void setPresettleAll(boolean presettleAll); boolean isPresettleProducers(); void setPresettleProducers(boolean presettleProducers); boolean isPresettleTopicProducers(); void setPresettleTopicProducers(boolean presettleTopicProducers); boolean isPresettleQueueProducers(); void setPresettleQueueProducers(boolean presettleQueueProducers); boolean isPresettleTransactedProducers(); void setPresettleTransactedProducers(boolean presettleTransactedProducers); boolean isPresettleConsumers(); void setPresettleConsumers(boolean presettleConsumers); boolean isPresettleTopicConsumers(); void setPresettleTopicConsumers(boolean presettleTopicConsumers); boolean isPresettleQueueConsumers(); void setPresettleQueueConsumers(boolean presettleQueueConsumers); @Override int hashCode(); @Override boolean equals(Object obj); }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (presettleAll ? 1231 : 1237); result = prime * result + (presettleConsumers ? 1231 : 1237); result = prime * result + (presettleProducers ? 1231 : 1237); result = prime * result + (presettleQueueConsumers ? 1231 : 1237); result = prime * result + (presettleQueueProducers ? 1231 : 1237); result = prime * result + (presettleTopicConsumers ? 1231 : 1237); result = prime * result + (presettleTopicProducers ? 1231 : 1237); result = prime * result + (presettleTransactedProducers ? 1231 : 1237); return result; } JmsDefaultPresettlePolicy();  JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source); @Override JmsDefaultPresettlePolicy copy(); @Override boolean isConsumerPresttled(JmsSession session, JmsDestination destination); @Override boolean isProducerPresttled(JmsSession session, JmsDestination destination); boolean isPresettleAll(); void setPresettleAll(boolean presettleAll); boolean isPresettleProducers(); void setPresettleProducers(boolean presettleProducers); boolean isPresettleTopicProducers(); void setPresettleTopicProducers(boolean presettleTopicProducers); boolean isPresettleQueueProducers(); void setPresettleQueueProducers(boolean presettleQueueProducers); boolean isPresettleTransactedProducers(); void setPresettleTransactedProducers(boolean presettleTransactedProducers); boolean isPresettleConsumers(); void setPresettleConsumers(boolean presettleConsumers); boolean isPresettleTopicConsumers(); void setPresettleTopicConsumers(boolean presettleTopicConsumers); boolean isPresettleQueueConsumers(); void setPresettleQueueConsumers(boolean presettleQueueConsumers); @Override int hashCode(); @Override boolean equals(Object obj);  }