class Converters {

    public static OptionalHostnamePort toOptionalHostnamePortFromRawAddress( String rawAddress )
    {
        HostnamePort hostnamePort = new HostnamePort( rawAddress );
        Optional<String> processedHost = Optional.ofNullable( hostnamePort.getHost() )
                .map( str -> str.replaceAll( "\\[", "" ) )
                .map( str -> str.replaceAll( "]", "" ) );
        return new OptionalHostnamePort( processedHost, optionalFromZeroable( hostnamePort.getPorts()[0] ),
                optionalFromZeroable( hostnamePort.getPorts()[1] ) );
    }

    private  Converters();

}