class CollectionUtilities {

    public static <K, V> Map<K, V> map(Collection<? extends V> values, Function<? super V, ? extends K> partitioner)
    {
        Map<K, V> map = New.map();
        for (V value : values)
        {
            K key = partitioner.apply(value);
            map.put(key, value);
        }
        return map;
    }

    private  CollectionUtilities();

}