@Test public void testEquals() { AnswerRowsOptions group1Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 2, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group1Elem2 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 2, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group2Elem1 = new AnswerRowsOptions( ImmutableSet.of("b"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 2, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group3Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "2")), 1, 2, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group4Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 3, 2, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group5Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 4, ImmutableList.of(new ColumnSortOption("c", false)), false); AnswerRowsOptions group6Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 2, ImmutableList.of(new ColumnSortOption("d", false)), false); AnswerRowsOptions group7Elem1 = new AnswerRowsOptions( ImmutableSet.of("a"), ImmutableList.of(new ColumnFilter("a", "1")), 1, 2, ImmutableList.of(new ColumnSortOption("c", false)), true); new EqualsTester() .addEqualityGroup(group1Elem1, group1Elem2) .addEqualityGroup(group2Elem1) .addEqualityGroup(group3Elem1) .addEqualityGroup(group4Elem1) .addEqualityGroup(group5Elem1) .addEqualityGroup(group6Elem1) .addEqualityGroup(group7Elem1) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof AnswerRowsOptions)) { return false; } AnswerRowsOptions rhs = (AnswerRowsOptions) obj; return _columns.equals(rhs._columns) && _filters.equals(rhs._filters) && _maxRows == rhs._maxRows && _rowOffset == rhs._rowOffset && _sortOrder.equals(rhs._sortOrder) && _uniqueRows == rhs._uniqueRows; }
AnswerRowsOptions { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof AnswerRowsOptions)) { return false; } AnswerRowsOptions rhs = (AnswerRowsOptions) obj; return _columns.equals(rhs._columns) && _filters.equals(rhs._filters) && _maxRows == rhs._maxRows && _rowOffset == rhs._rowOffset && _sortOrder.equals(rhs._sortOrder) && _uniqueRows == rhs._uniqueRows; } }
AnswerRowsOptions { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof AnswerRowsOptions)) { return false; } AnswerRowsOptions rhs = (AnswerRowsOptions) obj; return _columns.equals(rhs._columns) && _filters.equals(rhs._filters) && _maxRows == rhs._maxRows && _rowOffset == rhs._rowOffset && _sortOrder.equals(rhs._sortOrder) && _uniqueRows == rhs._uniqueRows; } AnswerRowsOptions(
      @Nonnull Set<String> columns,
      @Nonnull List<ColumnFilter> filters,
      int maxRows,
      int rowOffset,
      @Nonnull List<ColumnSortOption> sortOrder,
      boolean uniqueRows); }
AnswerRowsOptions { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof AnswerRowsOptions)) { return false; } AnswerRowsOptions rhs = (AnswerRowsOptions) obj; return _columns.equals(rhs._columns) && _filters.equals(rhs._filters) && _maxRows == rhs._maxRows && _rowOffset == rhs._rowOffset && _sortOrder.equals(rhs._sortOrder) && _uniqueRows == rhs._uniqueRows; } AnswerRowsOptions(
      @Nonnull Set<String> columns,
      @Nonnull List<ColumnFilter> filters,
      int maxRows,
      int rowOffset,
      @Nonnull List<ColumnSortOption> sortOrder,
      boolean uniqueRows); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_COLUMNS) Set<String> getColumns(); @JsonProperty(BfConsts.PROP_FILTERS) @Nonnull List<ColumnFilter> getFilters(); @JsonProperty(BfConsts.PROP_MAX_ROWS) int getMaxRows(); @JsonProperty(BfConsts.PROP_ROW_OFFSET) int getRowOffset(); @JsonProperty(BfConsts.PROP_SORT_ORDER) List<ColumnSortOption> getSortOrder(); @JsonProperty(BfConsts.PROP_UNIQUE_ROWS) boolean getUniqueRows(); @Override int hashCode(); @Override String toString(); }
AnswerRowsOptions { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof AnswerRowsOptions)) { return false; } AnswerRowsOptions rhs = (AnswerRowsOptions) obj; return _columns.equals(rhs._columns) && _filters.equals(rhs._filters) && _maxRows == rhs._maxRows && _rowOffset == rhs._rowOffset && _sortOrder.equals(rhs._sortOrder) && _uniqueRows == rhs._uniqueRows; } AnswerRowsOptions(
      @Nonnull Set<String> columns,
      @Nonnull List<ColumnFilter> filters,
      int maxRows,
      int rowOffset,
      @Nonnull List<ColumnSortOption> sortOrder,
      boolean uniqueRows); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_COLUMNS) Set<String> getColumns(); @JsonProperty(BfConsts.PROP_FILTERS) @Nonnull List<ColumnFilter> getFilters(); @JsonProperty(BfConsts.PROP_MAX_ROWS) int getMaxRows(); @JsonProperty(BfConsts.PROP_ROW_OFFSET) int getRowOffset(); @JsonProperty(BfConsts.PROP_SORT_ORDER) List<ColumnSortOption> getSortOrder(); @JsonProperty(BfConsts.PROP_UNIQUE_ROWS) boolean getUniqueRows(); @Override int hashCode(); @Override String toString(); static @Nonnull AnswerRowsOptions NO_FILTER; }