We have two kinds of IDs, internal and externalA. Currently records have both internal and externalA IDs, and in future there might be externalB types of IDs so some records could have internal and externalB IDs.
We currently represent all IDs as Strings. It can lead to bugs, where a method expects internal, but externalA key was actually passed.
How do we prevent this type of error? Would wrapping String keys into InternalID, ExternalAID, ExternalBID classes and use those wrappers everywhere work for us? I am concerned about memory footprint, which could especially happen if we are talking about hundreds of millions of keys, and maybe other stuff that can go wrong.