key
key copied to clipboard
Removal of Triple, and Quadruple
Refactoring
This PR starts the removal of generic data classes in favor of Java records (aka. named tuples). In this PR, only Triple
and Quadruple
are removed.
In general, generic parametric data classes (Tuple
, Union
, ...) lead to unreadable, incomprehensible code, e.g., what does the entity Triple<StatementBlock, URI, Integer>
express? Answer: It is the key in a map to find block contracts. Using the record BlockContractKey
expresses this better than triple of something.
Therefore, records give you the chance of defining useful variable names, and documentation, and also avoid auto-boxing (hence NPE).
Intended Change
No use of Triple<…>
and Quadruple<…>
.
Type of pull request
- X Refactoring (behaviour should not change or only minimally change)
- X There are changes to the (Java) code
Ensuring quality
- X by TEST CASES!!! and compiler