class IndexRangeConstraint extends Constraint implements Writable {

  @Override
  public boolean equals(Object compareto) {
    if (!(compareto instanceof IndexRangeConstraint) || compareto == null) {
      return false;
    }

    IndexRangeConstraint compare = (IndexRangeConstraint) compareto;

    if (range == null && compare.getRange() != null) {
      return false;
    }
    
    if (range == null && compare.getRange() == null) {
        return true;
      }    
    
    if (range != null && compare.getRange() == null) {
        return false;
    }
    
    return range.equals(compare.getRange());
  }

  public  IndexRangeConstraint(Index index, CRange range);
  public  IndexRangeConstraint();

}