uk.gov.dstl.baleen.core.utils.yaml.YamlMap类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(143)

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

YamlMap介绍

[英]Use a map to represent a Yaml configuration
[中]使用映射来表示Yaml配置

代码示例

代码示例来源:origin: uk.gov.dstl.baleen/baleen-core

@Override
 protected String getSource() throws IOException {
  return formatted();
 }
}

代码示例来源: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());
 }
}

代码示例来源: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

@Override
 protected String getSource() throws IOException {
  return formatted();
 }
}

相关文章

YamlMap类方法