March 2019
Intermediate to advanced
242 pages
6h 21m
English
The aggregate form of a data class will be the name of the data class. Its exploded form would refer to the variables used to store its data. The conversion from aggregate to exploded form is referred to as the deconstruction pattern.
The following code refers to the example that we used in the preceding section:
record Emp(String name, int age) { }
Emp is the aggregate form of the Emp data class. Its exploded form would be String name and int age. The language would need easy conversion between the two, so that they can be used with other language constructs, such as switch.
Read now
Unlock full access