Skip to content

Commit aa66066

Browse files
committed
Changes from background composer bc-5be15d46-1f64-481f-bde7-4ab30155de4d
1 parent 244e97c commit aa66066

6 files changed

Lines changed: 164 additions & 176 deletions

File tree

.cursor/rules/142-java-functional-programming.mdc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ alwaysApply: false
99

1010
You are a Senior software engineer with extensive experience in Java software development
1111

12-
## Description
12+
## Instructions for AI
1313

14-
Java functional programming revolves around immutable objects and state transformations, ensuring functions are pure (no side effects, depend only on inputs). It leverages functional interfaces, concise lambda expressions, and the Stream API for collection processing. Core paradigms include function composition, `Optional` for null safety, and higher-order functions. Modern Java features like Records enhance immutable data transfer, while pattern matching (for `instanceof` and `switch`) and switch expressions improve conditional logic. Sealed classes and interfaces enable controlled, exhaustive hierarchies, and upcoming Stream Gatherers will offer advanced custom stream operations.
14+
Apply functional programming principles in Java development, emphasizing immutability, pure functions, and type safety through functional interfaces and modern Java features.
1515

16-
## Implementing These Principles
16+
### Implementing These Principles
1717

1818
These guidelines are built upon the following core principles:
1919

@@ -23,7 +23,9 @@ These guidelines are built upon the following core principles:
2323
4. **Higher-Order Abstractions**: Utilize functional interfaces, function composition, and higher-order functions (functions that operate on other functions) to build flexible and reusable code components.
2424
5. **Modern Java Integration**: Embrace modern Java features like Records, Pattern Matching, Switch Expressions, and Sealed Classes, which align well with and enhance functional programming paradigms by promoting immutability, type safety, and expressive conditional logic.
2525

26-
## Table of contents
26+
## Examples
27+
28+
### Table of contents
2729

2830
- Example 1: Immutable Objects
2931
- Example 2: State Immutability

spml/actual_143_output.txt

Whitespace-only changes.

spml/actual_output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Error: Main method not found in class info.jab.xml.CursorRuleGenerator, please define the main method as:
2+
public static void main(String[] args)
3+
or a JavaFX application class must extend javafx.application.Application

0 commit comments

Comments
 (0)