Introduction of record

Hi folks,

With Orekit 14 and the upgrade to JDK 21, I would like to introduce the use of the so-called record.
To start nice and easy, my idea is to turn the existing pure data container classes into record. Like Timestampeddouble for instance

In my opinion there’s many advantages to them:

  • they’re immutable, as in you can’t override their attributes
  • their equals method become smarter than the default one. If all arguments also have a non trivial equals, then you can actually check when two instances have the same content.
  • they have built-in getters so they don’t need to be written. The catch is that the naming mirrors the name of the attributes, there is no “get”

So on that last point, I think we should soften up the blow of API breaking and keep the old style getters, but deprecated and calling the native ones. We’ll get rid of them for Orekit 15.

What do you think of this plan?

Cheers,
Romain.

This seems good to me and users friendly.

Completely agree, we will be able to leverage improvements from the more recent java version.

Cheers,
Vincent