|
|
|
|
|
by spreiti
1068 days ago
|
|
FYI: With Java 21 (2023/09/19) this is finally possible. Relevant JEPs: - 441: Pattern Matching for switch - 440: Record Patterns - 409: Sealed Classes - 395: Records It is kind of similar to Scalas version of pattern matching with case classes. |
|