ch.lambdaj.Lambda.convertMap()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(279)

本文整理了Java中ch.lambdaj.Lambda.convertMap()方法的一些代码示例,展示了Lambda.convertMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lambda.convertMap()方法的具体详情如下:
包路径:ch.lambdaj.Lambda
类名称:Lambda
方法名:convertMap

Lambda.convertMap介绍

[英]Converts all the values in the map using the given Converter.
[中]使用给定的转换器转换映射中的所有值。

代码示例

代码示例来源:origin: mariofusco/lambdaj

/**
 * Converts all the values in the map extracting the property defined by the given argument.
 * @param map The map containing the values to be converted
 * @param argument An argument defined using the {@link Lambda#on(Class)} method
 * @return A Map containing the same keys of the original one and the argument's value extracted from the value
 *      in the corresponding entry of the map
 */
public static <K, F, T> Map<K, T> convertMap(Map<K, F> map, T argument) {
  return convertMap(map, new ArgumentConverter<F, T>(argument));
}

代码示例来源:origin: mariofusco/lambdaj

/**
 * Converts all the values in this map using the given {@link Converter}.
 * @param converter The converter that specifies how each map's value must be converted
 * @return A Map containing the same keys of the original one and the value converted from the ones
 *      in the corresponding entry of the map
 */
public <T> LambdaMap<K, T> convertValues(Converter<V, T> converter) {
  return new LambdaMap<K, T>(convertMap(innerMap, converter));
}

代码示例来源:origin: mariofusco/lambdaj

/**
 * Converts all the values in this map extracting the property defined by the given argument.
 * @param argument An argument defined using the {@link ch.lambdaj.Lambda#on(Class)} method method
 * @return A Map containing the same keys of the original one and the argument's value extracted from the value
 *      in the corresponding entry of the map
 */
public <T> LambdaMap<K, T> convertValues(T argument) {
  return new LambdaMap<K, T>(convertMap(innerMap, argument));
}

代码示例来源:origin: io.openscore.lang/score-lang-compiler

Map<String, ExecutionPlan> dependencies = convertMap(filteredDependencies, new Converter<Executable, ExecutionPlan>() {
  @Override
  public ExecutionPlan convert(Executable compiledExecutable) {

代码示例来源:origin: io.cloudslang.lang/cloudslang-compiler

Map<String, ExecutionPlan> dependencies = convertMap(filteredDependencies, converter);
Collection<Executable> executables = new ArrayList<>(filteredDependencies.values());
executables.add(executable);

代码示例来源:origin: CloudSlang/cloud-slang

Map<String, ExecutionPlan> dependencies = convertMap(filteredDependencies, converter);
Collection<Executable> executables = new ArrayList<>(filteredDependencies.values());
executables.add(executable);

相关文章