IndexRangeConstraint extends Constraint implements Writable { @Override public String toString() { boolean startNotNull = false; StringBuilder sb = new StringBuilder(); sb.append("IndexRangeConstraint("); if (range != null && range.getStart() != null) { sb.append(range.getStart().hashCode()); startNotNull = true; } if (range != null && range.getEnd() != null) { if (startNotNull) { sb.append(", "); } sb.append(range.getEnd().hashCode()); } sb.append(")"); return sb.toString(); } 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 testIndexRangeToString() { CRange range = new CRange(); CRange range2 = new CRange(new byte[] { 0 }); CRange range3 = new CRange(new byte[] { 0 }, new byte[] { 3 }); Assert.assertEquals("IndexRangeConstraint()", new IndexRangeConstraint( null, null).toString()); Assert.assertNotSame("IndexRangeConstraint()", new IndexRangeConstraint( null, range).toString()); Assert.assertNotSame("IndexRangeConstraint()", new IndexRangeConstraint( null, range2).toString()); Assert.assertNotSame("IndexRangeConstraint()", new IndexRangeConstraint( null, range3).toString()); Assert.assertNotSame(new IndexRangeConstraint(null, range3).toString(), new IndexRangeConstraint(null, range2).toString()); }