Looking for java Answers? Try Ask4KnowledgeBase
Looking for java Keywords? Try Ask4Keywords

Java Language Conversion d'un itérateur en flux


Exemple

Utilisez Spliterators.spliterator() ou Spliterators.spliteratorUnknownSize() pour convertir un itérateur en flux:

Iterator<String> iterator = Arrays.asList("A", "B", "C").iterator();    
Spliterator<String> spliterator = Spliterators.spliteratorUnknownSize(iterator, 0);
Stream<String> stream = StreamSupport.stream(spliterator, false);