简体   繁体   English

排序 Map <arraylist<key> ,ArrayList<value> 按值而不是键</value></arraylist<key>

[英]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.我正在尝试对 Map<K, V> 进行排序,但我的 map 的键和值都为 ArrayList、ArrayList。 Is there an easy way to sort this type of map BY Value?有没有一种简单的方法可以按值对这种类型的 map 进行排序? 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/请参阅以下文章了解如何按值对Map进行排序: 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.如果这不是您正在寻找的内容,请提供一些示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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