本文整理了Java中uk.gov.dstl.baleen.core.utils.yaml.YamlMap
类的一些代码示例,展示了YamlMap
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlMap
类的具体详情如下:
包路径:uk.gov.dstl.baleen.core.utils.yaml.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();
}
}
内容来源于网络,如有侵权,请联系作者删除!