Sitelet https://github.com/javaevolved/javaevolved.github.io/pull/197
Skip to content

Add Comparator factories and fluent ordering pattern - #197

Merged
brunoborges merged 1 commit into
mainfrom
brunoborges-comparator-factories-fluent-ordering
Aug 26, 2026
Merged

Add Comparator factories and fluent ordering pattern#197
brunoborges merged 1 commit into
mainfrom
brunoborges-comparator-factories-fluent-ordering

Conversation

@brunoborges

Copy link
Copy Markdown
Member

Adds a beginner-friendly Collections pattern showing how Java 8 Comparator factories replace anonymous comparator implementations with readable, composable ordering rules.

The pattern demonstrates primary and secondary sort keys with Comparator.comparing() and thenComparingInt(), links it into the pattern navigation chain, and includes a Java 25 JBang compile proof.

Fixes: #174

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@brunoborges
brunoborges merged commit 6874c82 into main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Pattern] Comparator factories and fluent ordering

1 participant