private Double stringToDouble(String stringValue) {
    if (stringValue == null || stringValue.isEmpty()) {
      return null;
    }

    ParsePosition parsePosition = new ParsePosition(0);
    NumberFormat  numberFormat  = NumberFormat.getInstance();
    Number        parsedNumber  = numberFormat.parse(stringValue, parsePosition);

    return parsePosition.getIndex() == stringValue.length() ? parsedNumber.doubleValue() : null;
  }
Predicate that compares a given value to a {@link Resource} property.
ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/ComparisonPredicate.java