Java functional programming — immutable objects, streams, Optionals
Apply functional principles to Java — immutability, pure functions, Stream pipelines, idiomatic Optional, composition, effect-boundary separation — with hard safety gates (compile before and after, stop on red builds) and good/bad examples per area
- What
- Apply functional principles to Java — immutability, pure functions, Stream pipelines, idiomatic Optional, composition, effect-boundary separation — with hard safety gates (compile before and after, stop on red builds) and good/bad examples per area
- Cost
- Free
- Needs
- a compiling Java project (Maven with maven-compiler-plugin) the agent can read and refactor — the skill is a refactoring methodology with hard safety gates, not software to install
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor — @jabrena's Java functional-programming skill (part of the Plinth Toolkit, by Juan Antonio Breña Moral): apply functional principles to Java to improve immutability, expressiveness and maintainability. Covers immutable objects and Records (JEP 395), pure side-effect-free functions, functional interfaces, lambdas and method references, Stream API pipelines (filter/map/reduce, parallel streams, unmodifiable collectors), idiomatic `Optional` (`map`/`flatMap`/`filter`/`orElse*` over `isPresent()`+`get()`), function composition (`andThen`/`compose`), higher-order functions (memoization, currying, partial application), pattern matching for `instanceof` and `switch` (Java 21), sealed classes/interfaces, switch expressions, Stream Gatherers (JEP 461), and effect-boundary separation (side effects at the edges, pure core) — each area with good/bad code examples in `references/142-java-functional-programming.md`. Its signature is hard safety gates: run `./mvnw compile` before refactoring, stop immediately on a red build, verify the maven-compiler-plugin supports the features, run `./mvnw clean verify` after, and ask when scope is ambiguous. Honest caveats: methodology only — the agent needs a compiling Java project (Maven) to apply it to; Apache-2.0 licensed. Skill Harbor never reviews the code, review it yourself before use. Discovered via skills.sh.
Version:
Install
Prerequisites: a compiling Java project (Maven with maven-compiler-plugin) the agent can read and refactor — the skill is a refactoring methodology with hard safety gates, not software to install Install "Java functional programming — immutable objects, streams, Optionals" for me. It gives my agent @jabrena's functional-Java workflow (Plinth Toolkit): compile the project first (./mvnw compile — stop immediately on failure), verify the compiler plugin supports the planned features, read references/142-java-functional-programming.md for good/bad examples per area (immutable objects and Records, pure functions, functional interfaces, lambdas, Stream pipelines, idiomatic Optional, composition, higher-order functions, pattern matching, sealed types, switch expressions, Stream Gatherers, effect-boundary separation), apply scoped refactorings, then verify with ./mvnw clean verify — asking when scope is ambiguous. Apache-2.0-licensed. Repository: https://github.com/jabrena/plinth/blob/main/skills/142-java-functional-programming/SKILL.md 1. Fetch the SKILL.md file (and the references/ folder) from the repository path into a temporary folder and summarize what it does in one or two sentences. 2. Safety check: review the SKILL.md and references for anything suspicious (unexpected network calls, shell commands, credential harvesting). This repo should contain zero secrets in code. Verify that holds here; STOP on any red flag and tell me. 3. Install it as a skill: copy SKILL.md and its helper files into the agent's skills directory, in a folder named "142-java-functional-programming". 4. Verify with no network calls: frontmatter valid, files in place. 5. Report what was installed, where, and what I still need to do myself (e.g. point the agent at my compiling Maven project; nothing else — it's a refactoring methodology). GitHub is optional: if I have a GitHub account or the gh CLI, you may use it; otherwise public access is fine. Never require it unless it's in the prerequisites above. Rules: don't touch anything outside the temp folder and the install target. If anything looks off, stop and ask me.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.