@Test public void testEquals() { JmsDefaultPresettlePolicy policy1 = new JmsDefaultPresettlePolicy(); JmsDefaultPresettlePolicy policy2 = new JmsDefaultPresettlePolicy(); assertTrue(policy1.equals(policy1)); assertTrue(policy1.equals(policy2)); assertTrue(policy2.equals(policy1)); assertFalse(policy1.equals(null)); assertFalse(policy1.equals("test")); policy1.setPresettleAll(false); policy1.setPresettleAll(true); assertFalse(policy1.equals(policy2)); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(true); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(true); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(true); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(true); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(false); policy1.setPresettleTopicProducers(true); assertFalse(policy2.equals(policy1)); policy1.setPresettleAll(false); policy1.setPresettleProducers(false); policy2.setPresettleConsumers(false); policy2.setPresettleTopicConsumers(false); policy2.setPresettleQueueConsumers(false); policy1.setPresettleTopicProducers(false); policy1.setPresettleQueueProducers(true); assertFalse(policy2.equals(policy1)); 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(policy2.equals(policy1)); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsDefaultPresettlePolicy other = (JmsDefaultPresettlePolicy) obj; if (presettleAll != other.presettleAll) { return false; } if (presettleConsumers != other.presettleConsumers) { return false; } if (presettleProducers != other.presettleProducers) { return false; } if (presettleQueueConsumers != other.presettleQueueConsumers) { return false; } if (presettleQueueProducers != other.presettleQueueProducers) { return false; } if (presettleTopicConsumers != other.presettleTopicConsumers) { return false; } if (presettleTopicProducers != other.presettleTopicProducers) { return false; } if (presettleTransactedProducers != other.presettleTransactedProducers) { return false; } return true; }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsDefaultPresettlePolicy other = (JmsDefaultPresettlePolicy) obj; if (presettleAll != other.presettleAll) { return false; } if (presettleConsumers != other.presettleConsumers) { return false; } if (presettleProducers != other.presettleProducers) { return false; } if (presettleQueueConsumers != other.presettleQueueConsumers) { return false; } if (presettleQueueProducers != other.presettleQueueProducers) { return false; } if (presettleTopicConsumers != other.presettleTopicConsumers) { return false; } if (presettleTopicProducers != other.presettleTopicProducers) { return false; } if (presettleTransactedProducers != other.presettleTransactedProducers) { return false; } return true; } }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsDefaultPresettlePolicy other = (JmsDefaultPresettlePolicy) obj; if (presettleAll != other.presettleAll) { return false; } if (presettleConsumers != other.presettleConsumers) { return false; } if (presettleProducers != other.presettleProducers) { return false; } if (presettleQueueConsumers != other.presettleQueueConsumers) { return false; } if (presettleQueueProducers != other.presettleQueueProducers) { return false; } if (presettleTopicConsumers != other.presettleTopicConsumers) { return false; } if (presettleTopicProducers != other.presettleTopicProducers) { return false; } if (presettleTransactedProducers != other.presettleTransactedProducers) { return false; } return true; } JmsDefaultPresettlePolicy();  JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source); }
JmsDefaultPresettlePolicy implements JmsPresettlePolicy { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsDefaultPresettlePolicy other = (JmsDefaultPresettlePolicy) obj; if (presettleAll != other.presettleAll) { return false; } if (presettleConsumers != other.presettleConsumers) { return false; } if (presettleProducers != other.presettleProducers) { return false; } if (presettleQueueConsumers != other.presettleQueueConsumers) { return false; } if (presettleQueueProducers != other.presettleQueueProducers) { return false; } if (presettleTopicConsumers != other.presettleTopicConsumers) { return false; } if (presettleTopicProducers != other.presettleTopicProducers) { return false; } if (presettleTransactedProducers != other.presettleTransactedProducers) { return false; } return true; } 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 boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsDefaultPresettlePolicy other = (JmsDefaultPresettlePolicy) obj; if (presettleAll != other.presettleAll) { return false; } if (presettleConsumers != other.presettleConsumers) { return false; } if (presettleProducers != other.presettleProducers) { return false; } if (presettleQueueConsumers != other.presettleQueueConsumers) { return false; } if (presettleQueueProducers != other.presettleQueueProducers) { return false; } if (presettleTopicConsumers != other.presettleTopicConsumers) { return false; } if (presettleTopicProducers != other.presettleTopicProducers) { return false; } if (presettleTransactedProducers != other.presettleTransactedProducers) { return false; } return true; } 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);  }