What collection - each spliterator operation iterates over?

I am trying to understand what exactly happens with each iterator of the operation. Please correct me if I'm wrong: (I'm most likely wrong)

  • Each thread has a method .spliterator().
  • Each intermediate operation can change the characteristics of the separator.

My questions:

  • Does each intermediate operation and change the characteristics in the same separator - "source-separator"?
  • If we use the operation filter, some elements may be skipped. From which collection are these elements clouded exactly?
+4
source share
1 answer
  • - . Stream ( ).

  • Collection ( , - sum, count ..), .

+3

Source: https://habr.com/ru/post/1683888/


All Articles