class HostnamePortAsListenAddress {

    static ListenSocketAddress resolve( Config config, Setting<HostnamePort> setting )
    {
        Function<String,ListenSocketAddress> resolveFn = Settings.LISTEN_SOCKET_ADDRESS.compose( HostnamePortAsListenAddress::stripPortRange );
        return config.get( Settings.setting( setting.name(), resolveFn, setting.getDefaultValue() ) );
    }

}