class Length implements Cloneable, Serializable, Comparable<Length>, JAXBable<JAXBLength> {

    @SuppressWarnings("unchecked")
    public static Length parse(String className, String magnitude) throws InvalidUnitsException, ParseException
    {
        try
        {
            return create((Class<? extends Length>)Class.forName(className), Double.parseDouble(magnitude));
        }
        catch (NumberFormatException | ClassNotFoundException e)
        {
            throw new ParseException(className + " " + magnitude, 0);
        }
    }

    protected  Length(double magnitude);

}