io.vavr.collection.HashMap.ofAll()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(202)

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

HashMap.ofAll介绍

[英]Returns a HashMap, from a source java.util.Map.
[中]从源java返回哈希映射。util。地图

代码示例

代码示例来源:origin: apache/incubator-pinot

@Override
 public Map<String, ?> unhandleChildKeys(java.util.Map<String, String> value, String pathPrefix) {
  if (value == null) {
   return null;
  }

  return io.vavr.collection.HashMap.ofAll(value);
 }
}

代码示例来源:origin: apache/incubator-pinot

public static CombinedConfig loadCombinedConfig(Map<String, ?> config) {
 return loadCombinedConfig(HashMap.ofAll(config));
}

代码示例来源:origin: apache/incubator-pinot

@Override
 public io.vavr.collection.Map<String, ?> unhandleChildKeys(Map<String, Map<String, String>> value,
   String pathPrefix) {
  HashMap<String, String> retVal = HashMap.ofAll(value).flatMap((taskKey, configs) -> {
   if (!configs.isEmpty()) {
    return HashMap.ofAll(configs).map((configKey, configValue) -> Tuple.of(taskKey + "." + configKey, configValue));
   } else {
    return HashMap.of(taskKey, "");
   }
  });

  return retVal;
 }
}

代码示例来源:origin: apache/incubator-pinot

@Override
 public Map<String, ?> unhandleChildKeys(java.util.Map<String, T> value, String pathPrefix) {
  if (value == null) {
   return null;
  }

  final io.vavr.collection.HashMap<String, ?> serialized = io.vavr.collection.HashMap.ofAll(value).flatMap(
    (columnName, columnPartitionConfig) -> Serializer.serialize(columnPartitionConfig)
      .map((key, obj) -> Tuple.of(columnName + "." + key, obj)));
  return serialized;
 }
}

代码示例来源:origin: HalBuilder/halbuilder-core

/**
 * Add a link to this resource.
 *
 * @param rel
 * @param href The target href for the link, relative to the href of this resource.
 * @param properties The properties to add to this link object
 */
public ResourceRepresentation<V> withLink(
  String rel, String href, java.util.Map<String, String> properties) {
 return withLink(Links.create(rel, href, HashMap.ofAll(properties)));
}

代码示例来源:origin: HalBuilder/halbuilder-core

@ExportAsPublic
 static Link create(String rel, String href, java.util.Map<String, String> properties) {
  return Links.full0(rel, href, isTemplated(href), HashMap.ofAll(properties));
 }
}

相关文章