@Test public void testEquals() { GroupCountsResult r1 = createSampleResult(); GroupCountsResult r2 = createSampleResult(); assertTrue(r1.equals(r1)); assertTrue(r1.equals(r2)); assertFalse(r1.equals(new Integer(10))); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GroupCountsResult)) { return false; } GroupCountsResult rhs = (GroupCountsResult) obj; return this.items.equals(rhs.items); }
GroupCountsResult implements QueryResult { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GroupCountsResult)) { return false; } GroupCountsResult rhs = (GroupCountsResult) obj; return this.items.equals(rhs.items); } }
GroupCountsResult implements QueryResult { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GroupCountsResult)) { return false; } GroupCountsResult rhs = (GroupCountsResult) obj; return this.items.equals(rhs.items); } private  GroupCountsResult(final List<GroupCount> items); }
GroupCountsResult implements QueryResult { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GroupCountsResult)) { return false; } GroupCountsResult rhs = (GroupCountsResult) obj; return this.items.equals(rhs.items); } private  GroupCountsResult(final List<GroupCount> items); static GroupCountsResult create(final List<GroupCount> items); @Override int getType(); @Override RowResult getRow(); @Override List<CountResultItem> getCountItems(); @Override long getCount(); @Override long getValue(); @Override boolean isChanged(); @Override List<GroupCount> getGroupCounts(); @Override RowIdentifiersResult getRowIdentifiers(); @Override boolean equals(Object obj); @Override int hashCode(); }
GroupCountsResult implements QueryResult { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GroupCountsResult)) { return false; } GroupCountsResult rhs = (GroupCountsResult) obj; return this.items.equals(rhs.items); } private  GroupCountsResult(final List<GroupCount> items); static GroupCountsResult create(final List<GroupCount> items); @Override int getType(); @Override RowResult getRow(); @Override List<CountResultItem> getCountItems(); @Override long getCount(); @Override long getValue(); @Override boolean isChanged(); @Override List<GroupCount> getGroupCounts(); @Override RowIdentifiersResult getRowIdentifiers(); @Override boolean equals(Object obj); @Override int hashCode();  }