I am retrieving GeoPoints from a database and organize them for usage in frontend. The GeoPoints are aggregated in segments, the segments in layers, the layers are mapped to drive ids and that map is maped to car ids. The frontend displays all of that nicely, with Tooltips and such.
My REST GetMapping method looks like this.
public ResponseEntity<Map<Integer, Map<Integer, List<List<List<double>>>>>>
For new colleagues, this is insanely hard to understand. But I can't think of any other way to do it. Should I create dummy child classes of
List just so I can write something like
public ResponseEntity<CarMap<Integer, DriveMap<Integer, Layers<Segments<GeoPoints<double>>>>>>
How is something like this handled typically?