Indexing java arrays with string
I'd like to have string indices for an mxn array in java (a matrix). I mean, instead of numbers I'd like to have strings as indices.
By assingment instead of having a = 10; I would have a["x"]["y"] = 10;
The idea I have is to use another data structure such as a set or a hashtable. But I'd like to keep using arrays for performance reasons on the other hand I do need string indices.
The other idea is to have an array for the values and two indexing Vectors. One for the rows and the other for the columns. But before preoceeding with this solution, I'd like to ask if some one has a better solution.
Thanks in advance