问题
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