I have a very long structure in C that looks like..
something c =
{
{123, {1,2,3,4,5,5}},
{333, {1,2,4}},
{13}, {6,3,1,2,3,4,5,6,7,7,8}}
// continue for 100 lines
};
I need this in Java, I don't know any C but this looks like a hashmap where the key is an integer and the value is an array of integers. I tried something like
HashMap<Integer, Integer[]> something =
{
123:{1,2,3,4,5,5},
333:{1,2,4},
//continue for 100 lines
}
and this did not work.
EDIT: so the first number is an int called startX, and the array is full of short called startY. The code did something like
int tab = c[num];
int a = tab>startX;
short b = tab>startY;
so in Java I believe this is like
int a = something.get(startX);
int b = a[0];
I need to be able to traverse the data structure and was hoping I wouldn't have to manually type in all those lines :/