I have to "translate" codes with a conversion table like this:
| symbol | translation | | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 5 | | 5 | 2 | | 6 | 1 | | 7 | 1 |
My first idea was to use a Map
associating each symbol to its translation and to load the table from a database or a text/xml file. Is there a better way? Doesn't have to be lightning fast, just easy to maintain and test.
TIA.