All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rometools.utils.Doubles Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.rometools.utils;

public class Doubles {

    private Doubles() {
    }

    /**
     * Converts a String into an Double.
     *
     * @param s The String to convert, may be null
     * @return The parsed Double or null when parsing is not possible
     */
    public static Double parse(final String s) {
        Double parsed = null;
        try {
            if (s != null) {
                parsed = Double.parseDouble(s);
            }
        } catch (final NumberFormatException e) {
        }
        return parsed;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy