Thread safe sorted map implementation
@param <K>
@param <T>
@param <V>
@return
972872
public static <K, T, V> MultiDimensionalMap<K, T, V> newThreadSafeTreeBackedMap() {
        return new MultiDimensionalMap<>(new ConcurrentSkipListMap<Pair<K, T>, V>());
    }
255835
public static <K, V> LinkedHashMap<K, V> sortToMap(Collection<Map.Entry<K, V>> entryCollection, Comparator<Map.Entry<K, V>> comparator) {
		List<Map.Entry<K, V>> list = new LinkedList<>(entryCollection);
		Collections.sort(list, comparator);

		LinkedHashMap<K, V> result = new LinkedHashMap<>();
		for (Map.Entry<K, V> entry : list) {
			result.put(entry.getKey(), entry.getValue());
		}
		return result;
	}
690961
public static <K, V> Map<K, V> sort(Map<K, V> map,
            Comparator<K> comparator) {
        TreeMap<K, V> sortedMap = new TreeMap<>(comparator);
        sortedMap.putAll(map);
        return sortedMap;
    }
430436
public static <K, V> Map<K, V> sortNumberMapByValueDescending(Map<K, V> map) {
        ArrayList<Map.Entry<K, V>> entries = new ArrayList<>(map.entrySet());
        Collections.sort(entries, (Map.Entry<K, V> a, Map.Entry<K, V> b) -> {
            Double va = TypeInference.toDouble(a.getValue());
            Double vb = TypeInference.toDouble(b.getValue());
            return -va.compareTo(vb);
        });
        
        Map<K, V> sortedMap = new LinkedHashMap<>();
        for (Map.Entry<K, V> entry : entries) {
          sortedMap.put(entry.getKey(), entry.getValue());
        }
        
        return sortedMap;
    }
1240360
public static <K extends Comparable<K>, V> Map<K, V> sort(Map<K, V> map) {
        return new TreeMap<>(map);
    }
865483
public static <K, V extends Comparable> SortedSetMultimap<K, V> createSortedSetMultiValueMap() {
		return MultimapBuilder.hashKeys().treeSetValues().build();
	}
1109393
public static <K> List<Map.Entry<K, Integer>> sortByIntegerValue(Map<K, Integer> map) {
        List<Map.Entry<K, Integer>> orderList = new ArrayList<>(map.entrySet());
        Collections.sort(orderList, new Comparator<Map.Entry<K, Integer>>() {
            @Override
            public int compare(Map.Entry<K, Integer> o1, Map.Entry<K, Integer> o2) {
                return (o1.getValue() - o2.getValue());
            }
        });
        return orderList;
    }
538702
public static <K, V> TreeMap<K, V> newTreeMap(Map<K, V> map, Comparator<? super K> comparator) {
		final TreeMap<K, V> treeMap = new TreeMap<>(comparator);
		if (false == isEmpty(map)) {
			treeMap.putAll(map);
		}
		return treeMap;
	}
730972
@Inline(value="$2.$3copyOfSorted($1)", imported=ImmutableSortedMap.class)
	public static <K, V> SortedMap<K, V> immutableCopy(SortedMap<K, ? extends V> map) {
		return ImmutableSortedMap.copyOfSorted(map);
	}
1255060
public static <K, V> Map<K, V> sortByValue(Map<K, V> map, BeanComparator beanComparator)
	{
		return map.entrySet()
		.stream()
		.sorted(Map.Entry.comparingByValue(beanComparator))
		.collect(Collectors.toMap(
		Map.Entry::getKey,
		Map.Entry::getValue,
		(e1, e2) -> e1,
		LinkedHashMap::new));
	}
91622
public static <K, V extends Comparable> Map<K, V> sortByValue(Map<K, V> map, final boolean reverse) {
		return sortByValueInternal(map, reverse ? Ordering.from(new ComparableEntryValueComparator<K, V>()).reverse()
				: new ComparableEntryValueComparator<K, V>());
	}
602367
public static <K> List<Map.Entry<K, Double>> sortByDoubleValue(Map<K, Double> map) {
        List<Map.Entry<K, Double>> orderList = new ArrayList<>(map.entrySet());
        Collections.sort(orderList, new Comparator<Map.Entry<K, Double>>() {
            @Override
            public int compare(Map.Entry<K, Double> o1, Map.Entry<K, Double> o2) {
                double abs = o1.getValue() - o2.getValue();
                if (abs < 0) {
                    return -1;
                }
                if (abs > 0) {
                    return 1;
                }

                return 0;
            }
        });
        return orderList;
    }
302231
@SuppressWarnings("unchecked")
  public static <K extends Comparable<K>, V> DistributedSortedMapType<K, V> instance() {
    return INSTANCE;
  }
571366
@Override
    public ListT<W,T> sorted(final Comparator<? super T> c) {

        return (ListT<W,T>) FoldableTransformerSeq.super.sorted(c);
    }
95716
@Override
  public LaxImmutableMapBuilder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
    innerBuilder.orderEntriesByValue(valueComparator);
    return this;
  }
1294357
public static SortedSet<String> sortedKeys(Map<String, String> map) {
        return new TreeSet<String>(map.keySet());
    }
477450
@SuppressWarnings("unchecked")
  public static <K extends Comparable<K>, V> AtomicSortedMapType<K, V> instance() {
    return INSTANCE;
  }