Java Iterable

Опубликовано: 01 Ноябрь 2024
на канале: Jakob Jenkov
24,505
459

The Java Iterable interface, java.util.Iterable, represents a collection of element (objects) which can be iterated. You can iterate the elements of a Java Iterable in three ways: Using the Java for-each loop, by obtaining an Iterator from the Iterable and by calling the Iterable forEach() method. This Java Iterable tutorial shows you all these iteration options, as well as a few other aspects of the Java Iterable interface.

Chapters
0:00 Java Iterable introduction
1:20 Ways to iterate the elements of an Iterable
1:37 Iterate Iterable using the Java for-each loop
2:30 Iterate Iterable using an Iterator obtained from the Iterable
2:57 Iterate Iterable by calling its forEach() method
3:30 Obtain Spliterator from Iterable
3:55 Java Iterable implementations
4:45 Java Iterable interface definition
6:07 Implement Iterable in your own class
7:59 Usage of your own Iterable implementation
10:33 Java Iterable performance

Java Iterable tutorial - text
http://tutorials.jenkov.com/java-coll...

Java Iterator tutorial - text / video
http://tutorials.jenkov.com/java-coll...
   • Java Iterator - In Depth  

Java Lambda Expression tutorial - text / video
http://tutorials.jenkov.com/java/lamb...
   • Java Lambda Expressions #1 - The Basics