ResultFilter extends Constraint { @Override public boolean equals(Object compareto) { if (!(compareto instanceof ResultFilter)) { return false; } ResultFilter compare = (ResultFilter) compareto; if (this.subConstraint == null && compare.subConstraint != null) { return false; } if (this.subConstraint != null && compare.subConstraint == null) { return false; } if (this.subConstraint != null) { if (this.subConstraint.equals(compare.subConstraint) && Arrays.equals(this.columns, compare.columns) && this.range.compareTo(compare.range) == 0) { return true; } else { return false; } } return true; } ResultFilter();  ResultFilter(Constraint subConstraint, CRange range,
      CColumn... columns);  ResultFilter(TableAdapter primaryTable, CRange range,
      CColumn... columns);  ResultFilter(CRange range, Constraint subConstraint);  ResultFilter(TableAdapter primaryTable, CRange range);  ResultFilter(Constraint subConstraint, CColumn... columns);  ResultFilter(TableAdapter primaryTable, CColumn... columns);  ResultFilter(TableAdapter primaryTable); @Override boolean equals(Object compareto); @Override int hashCode(); @Override String toString(); @Override SeekingCurrentIterator getResultIterator(); @Override void readFields(DataInput in); @Override void write(DataOutput out);  }
@Test public void testReadWrite() throws Exception { InMemoryTable table = new InMemoryTable(); ResultFilter fitler = new ResultFilter(table); ResultFilter ret = (ResultFilter) Utils.testReadWrite(fitler); assertEquals(fitler, ret); fitler = new ResultFilter(CRange.FULL_TABLE_RANGE, new MockConstraint()); ret = (ResultFilter) Utils.testReadWrite(fitler); assertTrue(fitler.equals(ret)); }