code: public static <T, K> Hashtable<K, T> toHashtable(Collection<T> entities,
  			Function<T, K> keyMapper) {
  		return toMap(entities, keyMapper, Hashtable<K, T>::new);
  	}
docs: Convert a collection to Hashtable. The key is decided by keyMapper, value
  is the object in collection
  
  @param entities
  @param keyMapper
  @return