Skip to content

AsrielDreemurrGM/Java_Streams_Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

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() and allMatch();
  • Collecting stream results into lists, sets, maps, and grouping with Collectors;
  • Working with Optional to find max/min (e.g., oldest and youngest);
  • Filtering by gender using console input and stream logic.

🗂️ Project Structure

  • br.com.eaugusto: Contains the shared Person.java class used by most examples, and the CreatingStreams.java class 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 own Person.java class;

🚀 How to Run

  1. Clone this repository and open it in your IDE (Spring Tool Suite, Eclipse, IntelliJ);
  2. Each class has a main method with examples that can be run directly;
  3. Review the inline comments and Javadocs for detailed explanations of each operation.

📅 Commit Highlights

June 19, 2025

  • Created filtering by gender using FilterByGender and the new local Person class specific to the new coursetask package.

June 18, 2025

  • Added optional examples for finding youngest and oldest entries;
  • Renamed CollectExample to CollectExamples and added Javadocs.

June 17, 2025

  • Implemented various Collectors: toList, toSet, toMap, groupingBy, etc.;
  • Expanded Person and added grouping examples.

June 16–15, 2025

  • Created classes for: filter, map, limit, distinct, sorted, and forEach examples;
  • 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 Optional handling for safer data retrieval.

About

Study repository focused on exploring Java Streams, showcasing various intermediate and terminal operations with practical examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages