@Test public void equals() { TagNotificationFilterPreference pref1 = new TagNotificationFilterPreference("mytag", "mywiki"); TagNotificationFilterPreference pref2 = new TagNotificationFilterPreference("mytag", "mywiki"); assertEquals(pref1, pref2); assertEquals(pref1.hashCode(), pref2.hashCode()); pref2 = new TagNotificationFilterPreference("anothertag", "mywiki"); assertNotEquals(pref1, pref2); assertNotEquals(pref1.hashCode(), pref2.hashCode()); pref2 = new TagNotificationFilterPreference("mytag", "anotherwiki"); assertNotEquals(pref1, pref2); assertNotEquals(pref1.hashCode(), pref2.hashCode()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagNotificationFilterPreference that = (TagNotificationFilterPreference) o; return new EqualsBuilder() .append(tag, that.tag) .append(currentWiki, that.currentWiki) .isEquals(); }
TagNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagNotificationFilterPreference that = (TagNotificationFilterPreference) o; return new EqualsBuilder() .append(tag, that.tag) .append(currentWiki, that.currentWiki) .isEquals(); } }
TagNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagNotificationFilterPreference that = (TagNotificationFilterPreference) o; return new EqualsBuilder() .append(tag, that.tag) .append(currentWiki, that.currentWiki) .isEquals(); } TagNotificationFilterPreference(String tag, String currentWiki); }
TagNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagNotificationFilterPreference that = (TagNotificationFilterPreference) o; return new EqualsBuilder() .append(tag, that.tag) .append(currentWiki, that.currentWiki) .isEquals(); } TagNotificationFilterPreference(String tag, String currentWiki); String getTag(); String getCurrentWiki(); @Override String getId(); @Override String getFilterName(); @Override String getProviderHint(); @Override boolean isEnabled(); @Override boolean isActive(); @Override NotificationFilterType getFilterType(); @Override Set<NotificationFormat> getNotificationFormats(); @Override Date getStartingDate(); @Override Set<String> getEventTypes(); @Override String getUser(); @Override String getPageOnly(); @Override String getPage(); @Override String getWiki(); @Override void setEnabled(boolean enabled); @Override boolean equals(Object o); @Override int hashCode(); }
TagNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagNotificationFilterPreference that = (TagNotificationFilterPreference) o; return new EqualsBuilder() .append(tag, that.tag) .append(currentWiki, that.currentWiki) .isEquals(); } TagNotificationFilterPreference(String tag, String currentWiki); String getTag(); String getCurrentWiki(); @Override String getId(); @Override String getFilterName(); @Override String getProviderHint(); @Override boolean isEnabled(); @Override boolean isActive(); @Override NotificationFilterType getFilterType(); @Override Set<NotificationFormat> getNotificationFormats(); @Override Date getStartingDate(); @Override Set<String> getEventTypes(); @Override String getUser(); @Override String getPageOnly(); @Override String getPage(); @Override String getWiki(); @Override void setEnabled(boolean enabled); @Override boolean equals(Object o); @Override int hashCode();  }