class StringHelper {

    public static boolean isNumericExpression(String string) {
        if (string.isEmpty()) {
            return false;
        }

        boolean isNumericExpression = true;

        for (int i = 0, l = string.length(); i < l; ++i) {
            Character ch = string.charAt(i);
            if (Character.getType(ch) != Character.DECIMAL_DIGIT_NUMBER
                    && Character.getType(ch) != Character.DASH_PUNCTUATION
                    && Character.getType(ch) != Character.CONNECTOR_PUNCTUATION
                    && Character.getType(ch) != Character.CURRENCY_SYMBOL
                    && Character.getType(ch) != Character.DIRECTIONALITY_WHITESPACE && ch != '%' && ch != '.'
                    && ch != ',' && ch != ':') {
                isNumericExpression = false;
                break;
            }
        }

        Matcher m = PATTERN_STARTS_WITH_NUMBER.matcher(string);
        try {

            if (m.find()) {
                double number = Double.parseDouble(StringNormalizer.normalizeNumber(m.group()));
                double convertedNumber = UnitNormalizer.getNormalizedNumber(number,
                        string.substring(m.end(), string.length()));
                if (number != convertedNumber) {
                    return true;
                }

            }
        } catch (NumberFormatException e) {
            LOGGER.debug("{}, {}", m.group(), e.getMessage());
            return false;
        }

        return isNumericExpression;
    }

    private  StringHelper();

}