@Test public void testEquals() { GetAnalysisAnswerMetricsAnswer group1Elem1 = new GetAnalysisAnswerMetricsAnswer( ImmutableMap.of( "a", AnswerMetadata.builder() .setMetrics( Metrics.builder() .setAggregations( ImmutableMap.of("A", ImmutableMap.of(Aggregation.MAX, 1))) .setNumRows(2) .build()) .setStatus(AnswerStatus.SUCCESS) .build())); GetAnalysisAnswerMetricsAnswer group1Elem2 = new GetAnalysisAnswerMetricsAnswer( ImmutableMap.of( "a", AnswerMetadata.builder() .setMetrics( Metrics.builder() .setAggregations( ImmutableMap.of("A", ImmutableMap.of(Aggregation.MAX, 1))) .setNumRows(2) .build()) .setStatus(AnswerStatus.SUCCESS) .build())); GetAnalysisAnswerMetricsAnswer group2Elem1 = new GetAnalysisAnswerMetricsAnswer( ImmutableMap.of( "b", AnswerMetadata.builder() .setMetrics( Metrics.builder() .setAggregations( ImmutableMap.of("A", ImmutableMap.of(Aggregation.MAX, 1))) .setNumRows(2) .build()) .setStatus(AnswerStatus.SUCCESS) .build())); new EqualsTester() .addEqualityGroup(group1Elem1, group1Elem2) .addEqualityGroup(group2Elem1) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof GetAnalysisAnswerMetricsAnswer)) { return false; } return _results.equals(((GetAnalysisAnswerMetricsAnswer) obj)._results); }
GetAnalysisAnswerMetricsAnswer { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof GetAnalysisAnswerMetricsAnswer)) { return false; } return _results.equals(((GetAnalysisAnswerMetricsAnswer) obj)._results); } }
GetAnalysisAnswerMetricsAnswer { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof GetAnalysisAnswerMetricsAnswer)) { return false; } return _results.equals(((GetAnalysisAnswerMetricsAnswer) obj)._results); } GetAnalysisAnswerMetricsAnswer(@Nonnull Map<String, AnswerMetadata> results); }
GetAnalysisAnswerMetricsAnswer { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof GetAnalysisAnswerMetricsAnswer)) { return false; } return _results.equals(((GetAnalysisAnswerMetricsAnswer) obj)._results); } GetAnalysisAnswerMetricsAnswer(@Nonnull Map<String, AnswerMetadata> results); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_RESULTS) @Nonnull Map<String, AnswerMetadata> getResults(); @Override int hashCode(); @Override String toString(); }
GetAnalysisAnswerMetricsAnswer { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof GetAnalysisAnswerMetricsAnswer)) { return false; } return _results.equals(((GetAnalysisAnswerMetricsAnswer) obj)._results); } GetAnalysisAnswerMetricsAnswer(@Nonnull Map<String, AnswerMetadata> results); @Override boolean equals(@Nullable Object obj); @JsonProperty(BfConsts.PROP_RESULTS) @Nonnull Map<String, AnswerMetadata> getResults(); @Override int hashCode(); @Override String toString();  }