Class MapUtil


public class MapUtil extends Object
Utilities for working with Java maps (dictionaries). For theory, see: https://en.wikipedia.org/wiki/Associative_array
Since:
2017-08-02
  • Constructor Details

    • MapUtil

      public MapUtil()
  • Method Details

    • entriesSortedByValues

      static <K, V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map, boolean reverse)
      Return a SortedSet of a Map based on Comparable values. From: https://stackoverflow.com/questions/2864840/treemap-sort-by-value
    • main

      public static void main(String[] args)
      Main test method.