this.comparator = comparator;
}
@Override
public int compare(Range<T> lhs, Range<T> rhs) {
return new CompareToBuilder().append(!lhs.iterator().hasNext(), !rhs.iterator().hasNext()).
append(Maybe.just(lhs.begin()), Maybe.just(rhs.begin()), comparator).
append(rhs.end(), lhs.end(), comparator).
toComparison();
}