Double dUpper = null;
if (literalLowerValue.length() > 0) {
try {
dLower = (Double)valueType.evaluate(literalLowerValue);
} catch (NumberFormatException e) {
throw new DiscoveryException("Invalid Double: "+literalLowerValue);
}
}
if (literalUpperValue.length() > 0) {
try {
dUpper = (Double)valueType.evaluate(literalUpperValue);
} catch (NumberFormatException e) {
throw new DiscoveryException("Invalid Double: "+literalUpperValue);
}
}
if ((dLower == null) && (dUpper == null)) {
throw new DiscoveryException("No range values were supplied.");
}
return NumericRangeQuery.newDoubleRange(
this.getName(),dLower,dUpper,lowerBoundaryIsInclusive,upperBoundaryIsInclusive);
}