How to sort ArrayList of strings with priority that obtained from a HashMap?

I have an ArrayList of ArrayLists and inside those ArrayLists I store Strings, and I would like to sort those string according to their priority that I store on a HashMap. Is there a efficient way to accomplish this task simply iterating over them?