@Test public void testEquals() { Metrics.Builder builder = Metrics.builder(); new EqualsTester() .addEqualityGroup(builder.build(), builder.build()) .addEqualityGroup( builder .setAggregations(ImmutableMap.of("a", ImmutableMap.of(Aggregation.MAX, "A"))) .build()) .addEqualityGroup(builder.setEmptyColumns(ImmutableSet.of("b")).build()) .addEqualityGroup(builder.setNumExcludedRows(5).build()) .addEqualityGroup(builder.setNumRows(3).build()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Metrics)) { return false; } Metrics rhs = (Metrics) obj; return _aggregations.equals(rhs._aggregations) && _emptyColumns.equals(rhs._emptyColumns) && _numExcludedRows == rhs._numExcludedRows && _numRows == rhs._numRows; }
Metrics { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Metrics)) { return false; } Metrics rhs = (Metrics) obj; return _aggregations.equals(rhs._aggregations) && _emptyColumns.equals(rhs._emptyColumns) && _numExcludedRows == rhs._numExcludedRows && _numRows == rhs._numRows; } }
Metrics { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Metrics)) { return false; } Metrics rhs = (Metrics) obj; return _aggregations.equals(rhs._aggregations) && _emptyColumns.equals(rhs._emptyColumns) && _numExcludedRows == rhs._numExcludedRows && _numRows == rhs._numRows; } private  Metrics(
      @Nonnull Map<String, Map<Aggregation, Object>> aggregations,
      @Nonnull Set<String> emptyColumns,
      int numExcludedRows,
      int numRows); }
Metrics { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Metrics)) { return false; } Metrics rhs = (Metrics) obj; return _aggregations.equals(rhs._aggregations) && _emptyColumns.equals(rhs._emptyColumns) && _numExcludedRows == rhs._numExcludedRows && _numRows == rhs._numRows; } private  Metrics(
      @Nonnull Map<String, Map<Aggregation, Object>> aggregations,
      @Nonnull Set<String> emptyColumns,
      int numExcludedRows,
      int numRows); static @Nonnull Builder builder(); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_AGGREGATIONS) @Nonnull Map<String, Map<Aggregation, Object>> getAggregations(); @JsonProperty(BfConsts.PROP_EMPTY_COLUMNS) Set<String> getEmptyColumns(); @JsonProperty(BfConsts.PROP_NUM_EXCLUDED_ROWS) int getNumExcludedRows(); @JsonProperty(BfConsts.PROP_NUM_ROWS) int getNumRows(); @Override int hashCode(); @Override String toString(); }
Metrics { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Metrics)) { return false; } Metrics rhs = (Metrics) obj; return _aggregations.equals(rhs._aggregations) && _emptyColumns.equals(rhs._emptyColumns) && _numExcludedRows == rhs._numExcludedRows && _numRows == rhs._numRows; } private  Metrics(
      @Nonnull Map<String, Map<Aggregation, Object>> aggregations,
      @Nonnull Set<String> emptyColumns,
      int numExcludedRows,
      int numRows); static @Nonnull Builder builder(); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_AGGREGATIONS) @Nonnull Map<String, Map<Aggregation, Object>> getAggregations(); @JsonProperty(BfConsts.PROP_EMPTY_COLUMNS) Set<String> getEmptyColumns(); @JsonProperty(BfConsts.PROP_NUM_EXCLUDED_ROWS) int getNumExcludedRows(); @JsonProperty(BfConsts.PROP_NUM_ROWS) int getNumRows(); @Override int hashCode(); @Override String toString();  }