Abstract
By the end of this chapter students should be able to:
-
explain the term stream in the context of the java stream API;
-
identify the advantages of stream processing over iteration;
-
describe the three stages involved in processing a stream;
-
explain what is meant by lazy evaluation;
-
create streams from scratch, from collections and from files;
-
use a variety of intermediate methods to process streams;
-
use appropriate methods to terminate streams;
-
explain the difference between stateless and stateful operations;
-
explain how streams can be created in parallel mode;
-
identify the possible pitfalls with parallel stream processing and explain how to avoid them.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
More detail about the Paths class and Path interface can be found on the Oracle™ website.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Charatan, Q., Kans, A. (2019). The Stream API. In: Java in Two Semesters. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-99420-8_22
Download citation
DOI: https://doi.org/10.1007/978-3-319-99420-8_22
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99419-2
Online ISBN: 978-3-319-99420-8
eBook Packages: Computer ScienceComputer Science (R0)