@Test public void testCompareTo() { SubscriptionData subscriptionData = new SubscriptionData("TOPICA", "*"); SubscriptionData subscriptionData1 = new SubscriptionData("TOPICBA", "*"); assertThat(subscriptionData.compareTo(subscriptionData1)).isEqualTo("TOPICA@*".compareTo("TOPICB@*")); }
@Override public int compareTo(SubscriptionData other) { String thisValue = this.topic + "@" + this.subString; String otherValue = other.topic + "@" + other.subString; return thisValue.compareTo(otherValue); }
SubscriptionData implements Comparable<SubscriptionData> { @Override public int compareTo(SubscriptionData other) { String thisValue = this.topic + "@" + this.subString; String otherValue = other.topic + "@" + other.subString; return thisValue.compareTo(otherValue); } }
SubscriptionData implements Comparable<SubscriptionData> { @Override public int compareTo(SubscriptionData other) { String thisValue = this.topic + "@" + this.subString; String otherValue = other.topic + "@" + other.subString; return thisValue.compareTo(otherValue); } SubscriptionData();  SubscriptionData(String topic, String subString); }
SubscriptionData implements Comparable<SubscriptionData> { @Override public int compareTo(SubscriptionData other) { String thisValue = this.topic + "@" + this.subString; String otherValue = other.topic + "@" + other.subString; return thisValue.compareTo(otherValue); } SubscriptionData();  SubscriptionData(String topic, String subString); String getFilterClassSource(); void setFilterClassSource(String filterClassSource); String getTopic(); void setTopic(String topic); String getSubString(); void setSubString(String subString); Set<String> getTagsSet(); void setTagsSet(Set<String> tagsSet); long getSubVersion(); void setSubVersion(long subVersion); Set<Integer> getCodeSet(); void setCodeSet(Set<Integer> codeSet); boolean isClassFilterMode(); void setClassFilterMode(boolean classFilterMode); String getExpressionType(); void setExpressionType(String expressionType); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(SubscriptionData other); }
SubscriptionData implements Comparable<SubscriptionData> { @Override public int compareTo(SubscriptionData other) { String thisValue = this.topic + "@" + this.subString; String otherValue = other.topic + "@" + other.subString; return thisValue.compareTo(otherValue); } SubscriptionData();  SubscriptionData(String topic, String subString); String getFilterClassSource(); void setFilterClassSource(String filterClassSource); String getTopic(); void setTopic(String topic); String getSubString(); void setSubString(String subString); Set<String> getTagsSet(); void setTagsSet(Set<String> tagsSet); long getSubVersion(); void setSubVersion(long subVersion); Set<Integer> getCodeSet(); void setCodeSet(Set<Integer> codeSet); boolean isClassFilterMode(); void setClassFilterMode(boolean classFilterMode); String getExpressionType(); void setExpressionType(String expressionType); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(SubscriptionData other); final static String SUB_ALL; }