public final boolean isInside(final TextLocation location) {
if (location == null || location.isEmpty()) {
return false;
}
final TextLocation startLocation = getStartLocation();
final TextLocation endLocation = getEndLocation();
return startLocation != null &&
endLocation != null &&
location.compareTo(startLocation) >= 0 &&
location.compareTo(endLocation) <= 0;