gpt4 book ai didi

uk.gov.dstl.baleen.core.utils.yaml.YamlMap.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 06:37:31 27 4
gpt4 key购买 nike

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

YamlMap.<init>介绍

[英]Construct a Yaml containing just the given key and value
[中]构造一个仅包含给定键和值的Yaml

代码示例

代码示例来源:origin: dstl/baleen

new YamlMap(
  "pipelines",
  ImmutableList.of(
new YamlMap(
  "jobs",
  ImmutableList.of(

代码示例来源:origin: dstl/baleen

@Test
public void testYamlMapFromMap() {
 Map<String, Object> map = new HashMap<>();
 map.put("key", "value");
 ImmutableMap<String, Object> immutableMap = ImmutableMap.copyOf(map);
 YamlMap yamlMap = new YamlMap(map);
 assertEquals("yaml map should have immutable map", immutableMap, yamlMap.dataTree());
}

代码示例来源:origin: dstl/baleen

@Test
public void testYamlMapFromStringObjectPair() {
 YamlMap yamlMap = new YamlMap("key", "value");
 ImmutableMap<String, Object> immutableMap = ImmutableMap.of("key", "value");
 assertEquals("yaml map should have immutable map", immutableMap, yamlMap.dataTree());
}

代码示例来源:origin: dstl/baleen

@Test
 public void testSource() throws IOException {
  YamlMap yamlMap = new YamlMap("key", "value");
  assertEquals(
    "Source should be original key value pair", "key: value", yamlMap.getSource().trim());
 }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com