I have a LinkedHashMap with a class as the Key as such:
private final Map<Files, String> list = new LinkedHashMap<Files,String>();
Files is a class consisting of 3 variables:
class Files {
public String file;
public String duration;
public String status;
}
Now I need to access the variables in Files using a index. I know that LinkedHashMap does not allow retrieving values using Index, so I tried this:
List<Entry<Files,String>> randAccess = new ArrayList<Entry<Files,String>>(list.entrySet());
Using randAccess.get(index)
I can retrieve the Key itself, but not the specific variables inside the class. So the output is somethinglike Files@6aa91761=String.
I want to be able to get the variable, something like: list.Files.status.Get(index)
would return return the value of "status" at the right Index.