I have the following list:
ObservableList<String> Books;
I know that if I want to have the sorted list I can write
public ObservableList<String> getBooks() {
return Books;
}
Now, my question may be pretty much nonsensical, but... is there a way to achieve the same result as above with streams? Something like
Books
.stream()
.sorted();
but then having the stream return me a sorted ObservableList?
I'm just starting to learn about streams and don't know much about it yet, so I was wondering if something like that is possible.