Class CollectionUtils

java.lang.Object
net.lenni0451.imnbt.utils.CollectionUtils

public class CollectionUtils extends Object
  • Constructor Details

    • CollectionUtils

      public CollectionUtils()
  • Method Details

    • sort

      public static <K, V> LinkedHashMap<K,V> sort(Map<K,V> map, Comparator<Map.Entry<K,V>> comparator)
      Sort a map.
      Type Parameters:
      K - The key type
      V - The value type
      Parameters:
      map - The map to sort
      comparator - The comparator to use
      Returns:
      The sorted map