IndexRangeConstraint extends Constraint implements Writable { @Override public int hashCode() { int i = 0; if (range != null) { i = range.hashCode(); } return i; } IndexRangeConstraint(Index index, CRange range);  IndexRangeConstraint(); @Override SeekingCurrentIterator getResultIterator(); CRange getRange(); @Override String toString(); @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override boolean equals(Object compareto); @Override int hashCode(); Index getIndex();  }
@Test public void testIndexRangeHashcode() { CRange range = new CRange(); CRange range2 = new CRange(new byte[] { 0 }); CRange range3 = new CRange(new byte[] { 0 }, new byte[] { 3 }); Assert.assertEquals(0, new IndexRangeConstraint(null, null).hashCode()); Assert.assertNotSame(0, new IndexRangeConstraint(null, range).hashCode()); Assert.assertNotSame(0, new IndexRangeConstraint(null, range2).hashCode()); Assert.assertNotSame(0, new IndexRangeConstraint(null, range3).hashCode()); }