简体   繁体   中英

Sort Map<ArrayList<Key>,ArrayList<Value> by value instead of Key

I am trying to sort the Map<K, V> but my map has both key and value as ArrayList, ArrayList. Is there an easy way to sort this type of map BY Value? Also, Value can have duplicates thanks for your help

See the following article for how to sort a Map by value: https://howtodoinjava.com/java/sort/java-sort-map-by-values/

If this is not exactly what you are looking for, please provide some example code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM