How to map strings to URIs?

青春壹個敷衍的年華 提交于 2019-12-24 12:08:10

问题


Let me say that I have a single string concatenated uris.

http://...[sp]http://...[sp]http://...

I'm trying to convert each split string to URIs.

Stream.of(string.split("\\s")).map(uri -> URI::new);

Compiler complains.

Cannot infer type-variable(s) R

What did I do wrong?


回答1:


Stream.of(s.split("//s")).map(URI::new);

click here for an example



来源:https://stackoverflow.com/questions/27613957/how-to-map-strings-to-uris

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!