I am working on an application that stores information about restaurants, each restaurant has 5 information "as indicated in the code below", I need to sort the restaurants according to the rate. However, after sorting by speed, I need to synchronize all the lists of arrays together so that their information matches correctly.
I have 5 ArrayLists, I need to sort one of them, but I also want to change the indices of the 4 other ArrayLists to match each other. I tried the list of maps, but it tells me that I can do this with only two parameters, not 5.
Here are my ArrayLists:
static public ArrayList<String> name = new ArrayList<String>();
static public ArrayList<String> lng = new ArrayList<String>();
static public ArrayList<String> lat = new ArrayList<String>();
static public ArrayList<String> address = new ArrayList<String>();
static public ArrayList<String> rate = new ArrayList<String>();
static public ArrayList<String> comment = new ArrayList<String>();
I need to sort the list of speeds, but also change the indices of others.