@SuppressWarnings("unlikely-arg-type") @Test public void testEqualsCode() { JmsConsumerInfo first = new JmsConsumerInfo(firstId, null); JmsConsumerInfo second = new JmsConsumerInfo(secondId, null); 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; } JmsConsumerInfo other = (JmsConsumerInfo) obj; return consumerId.equals(other.consumerId); }
JmsConsumerInfo extends JmsAbstractResource implements Comparable<JmsConsumerInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConsumerInfo other = (JmsConsumerInfo) obj; return consumerId.equals(other.consumerId); } }
JmsConsumerInfo extends JmsAbstractResource implements Comparable<JmsConsumerInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConsumerInfo other = (JmsConsumerInfo) obj; return consumerId.equals(other.consumerId); } JmsConsumerInfo(JmsConsumerId consumerId, JmsMessageDispatcher dispatcher); }
JmsConsumerInfo extends JmsAbstractResource implements Comparable<JmsConsumerInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConsumerInfo other = (JmsConsumerInfo) obj; return consumerId.equals(other.consumerId); } JmsConsumerInfo(JmsConsumerId consumerId, JmsMessageDispatcher dispatcher); JmsConsumerInfo copy(); @Override JmsConsumerId getId(); boolean isBrowser(); void setBrowser(boolean browser); boolean isListener(); void setListener(boolean listener); JmsDestination getDestination(); void setDestination(JmsDestination destination); int getPrefetchSize(); void setPrefetchSize(int prefetchSize); String getSelector(); void setSelector(String selector); boolean isExplicitClientID(); void setExplicitClientID(boolean explicitClientID); boolean isDurable(); void setDurable(boolean durable); String getSubscriptionName(); void setSubscriptionName(String durableSubscriptionId); boolean isShared(); void setShared(boolean shared); boolean isNoLocal(); void setNoLocal(boolean noLocal); void setLastDeliveredSequenceId(long lastDeliveredSequenceId); long getLastDeliveredSequenceId(); JmsSessionId getParentId(); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); boolean isPresettle(); void setPresettle(boolean presettle); boolean isConnectionConsumer(); void setConnectionConsumer(boolean connectionConsumer); int getMaxMessages(); void setMaxMessages(int maxMessages); JmsMessageDispatcher getDispatcher(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsConsumerInfo other); @Override void visit(JmsResourceVistor vistor); }
JmsConsumerInfo extends JmsAbstractResource implements Comparable<JmsConsumerInfo> { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } JmsConsumerInfo other = (JmsConsumerInfo) obj; return consumerId.equals(other.consumerId); } JmsConsumerInfo(JmsConsumerId consumerId, JmsMessageDispatcher dispatcher); JmsConsumerInfo copy(); @Override JmsConsumerId getId(); boolean isBrowser(); void setBrowser(boolean browser); boolean isListener(); void setListener(boolean listener); JmsDestination getDestination(); void setDestination(JmsDestination destination); int getPrefetchSize(); void setPrefetchSize(int prefetchSize); String getSelector(); void setSelector(String selector); boolean isExplicitClientID(); void setExplicitClientID(boolean explicitClientID); boolean isDurable(); void setDurable(boolean durable); String getSubscriptionName(); void setSubscriptionName(String durableSubscriptionId); boolean isShared(); void setShared(boolean shared); boolean isNoLocal(); void setNoLocal(boolean noLocal); void setLastDeliveredSequenceId(long lastDeliveredSequenceId); long getLastDeliveredSequenceId(); JmsSessionId getParentId(); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); boolean isLocalMessageExpiry(); void setLocalMessageExpiry(boolean localMessageExpiry); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy); boolean isPresettle(); void setPresettle(boolean presettle); boolean isConnectionConsumer(); void setConnectionConsumer(boolean connectionConsumer); int getMaxMessages(); void setMaxMessages(int maxMessages); JmsMessageDispatcher getDispatcher(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsConsumerInfo other); @Override void visit(JmsResourceVistor vistor);  }