@Test public void testEquals() { ColumnFilter group1Elem1 = new ColumnFilter("a", "1"); ColumnFilter group1Elem2 = new ColumnFilter("a", "1"); ColumnFilter group2Elem1 = new ColumnFilter("a", "2"); ColumnFilter group3Elem1 = new ColumnFilter("b", "1"); new EqualsTester() .addEqualityGroup(group1Elem1, group1Elem2) .addEqualityGroup(group2Elem1) .addEqualityGroup(group3Elem1) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ColumnFilter)) { return false; } ColumnFilter rhs = (ColumnFilter) obj; return _column.equals(rhs._column) && _filterText.equals(rhs._filterText); }
ColumnFilter { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ColumnFilter)) { return false; } ColumnFilter rhs = (ColumnFilter) obj; return _column.equals(rhs._column) && _filterText.equals(rhs._filterText); } }
ColumnFilter { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ColumnFilter)) { return false; } ColumnFilter rhs = (ColumnFilter) obj; return _column.equals(rhs._column) && _filterText.equals(rhs._filterText); } ColumnFilter(@Nonnull String column, @Nonnull String filterText); }
ColumnFilter { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ColumnFilter)) { return false; } ColumnFilter rhs = (ColumnFilter) obj; return _column.equals(rhs._column) && _filterText.equals(rhs._filterText); } ColumnFilter(@Nonnull String column, @Nonnull String filterText); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_COLUMN) @Nonnull String getColumn(); @JsonProperty(PROP_FILTER_TEXT) @Nonnull String getFilterText(); @Override int hashCode(); boolean matches(@Nonnull Row row); @Override String toString(); }
ColumnFilter { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ColumnFilter)) { return false; } ColumnFilter rhs = (ColumnFilter) obj; return _column.equals(rhs._column) && _filterText.equals(rhs._filterText); } ColumnFilter(@Nonnull String column, @Nonnull String filterText); @Override boolean equals(@Nullable Object obj); @JsonProperty(PROP_COLUMN) @Nonnull String getColumn(); @JsonProperty(PROP_FILTER_TEXT) @Nonnull String getFilterText(); @Override int hashCode(); boolean matches(@Nonnull Row row); @Override String toString();  }