pont-us / PuffinPlot

A program to plot and analyse palaeomagnetic data
GNU General Public License v3.0
3 stars 0 forks source link

Implement an "exportable parameters" interface #391

Open pont-us opened 3 years ago

pont-us commented 3 years ago

At present a lot of parameters classes (e.g. FisherValues, GreatCircles) have, effectively, an undeclared interface with standard methods toStrings, getHeaders, and getEmptyFields. I should define an official interface for these, especially now that we're allowed static methods in interfaces. Might be able to implement getEmptyFields as a default method calling through to getHeaders too? Or actually probably not since it's static.

The thing that makes this fiddly is that we need getEmptyFields as a static method previsely so that we can call it when we have a null value for the desired object. Perhaps a null object pattern would make sense?