Comment Comment by Eldt Some of the newer Java features are really nice for this: sealed interfaces, records, sealed interfaces, and record pattern matching parent Eldt 2 months ago