class StringToLocationConverter extends TypedConverter<String, Location> {

    @Nullable
    @Override
    public Location doConvert( @Nonnull String source ) throws ConversionException
    {
        final Matcher matcher = LOCATION_PATTERN.matcher( source );
        if ( !matcher.matches() )
        {
            throw new ConversionException( "Not a valid location: " + source );
        }
        try
        {
            return new Location( Double.valueOf( matcher.group( 1 ) ), Double.valueOf( matcher.group( 2 ) ) );
        }
        catch ( NumberFormatException e )
        {
            throw new ConversionException( "Not a valid location: " + source );
        }
    }

    public  StringToLocationConverter();

}