https://github.com/asrieldreemurrgm/java_streams_study
Study repository focused on exploring Java Streams, showcasing various intermediate and terminal operations with practical examples.
https://github.com/asrieldreemurrgm/java_streams_study
collect foreach functional-programming intermediate-operations java java-8 lambda-expressions optional spring-tool-suite4 stream-api streams terminal-operations
Last synced: 4 days ago
JSON representation
Study repository focused on exploring Java Streams, showcasing various intermediate and terminal operations with practical examples.
- Host: GitHub
- URL: https://github.com/asrieldreemurrgm/java_streams_study
- Owner: AsrielDreemurrGM
- Created: 2025-06-16T01:42:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-19T12:53:05.000Z (about 1 year ago)
- Last Synced: 2025-10-30T03:08:03.456Z (9 months ago)
- Topics: collect, foreach, functional-programming, intermediate-operations, java, java-8, lambda-expressions, optional, spring-tool-suite4, stream-api, streams, terminal-operations
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Java Streams Study
Study repository focused on exploring Java Streams, showcasing a wide range of intermediate and terminal operations
using clear, commented examples for learning purposes.
📌 Features
- Creating streams from collections, arrays, sets, and maps;
- Filter, map, distinct, sorted, limit, and forEach operations with Lambdas;
- Counting and validating elements with
count()andallMatch(); - Collecting stream results into lists, sets, maps, and grouping with
Collectors; - Working with
Optionalto find max/min (e.g., oldest and youngest); - Filtering by gender using console input and stream logic.
🗂️ Project Structure
-
br.com.eaugusto: Contains the sharedPerson.javaclass used by most examples, and theCreatingStreams.javaclass for stream creation; -
br.com.eaugusto.intermediateoperations: Filter, Map, Limit, Distinct, Sorted, etc; -
br.com.eaugusto.terminaloperations: forEach, count, allMatch and collectors; -
br.com.eaugusto.coursetask: Exercise involving filtering by gender using input, has its ownPerson.javaclass;
🚀 How to Run
- Clone this repository and open it in your IDE (Spring Tool Suite, Eclipse, IntelliJ);
- Each class has a
mainmethod with examples that can be run directly; - Review the inline comments and Javadocs for detailed explanations of each operation.
📅 Commit Highlights
June 19, 2025
- Created filtering by gender using
FilterByGenderand the new localPersonclass specific to the newcoursetaskpackage.
June 18, 2025
- Added optional examples for finding youngest and oldest entries;
- Renamed
CollectExampletoCollectExamplesand added Javadocs.
June 17, 2025
- Implemented various
Collectors: toList, toSet, toMap, groupingBy, etc.; - Expanded
Personand added grouping examples.
June 16–15, 2025
- Created classes for:
filter,map,limit,distinct,sorted, andforEachexamples; - Built helper methods to populate people and reuse logic.
🎯 Learning Goals
- Understand how Java Stream API simplifies collection processing;
- Practice real-world stream operations with filtering, mapping and aggregation;
- Apply functional programming concepts like lambdas and method references;
- Explore
Optionalhandling for safer data retrieval.