@Test void entries() { final YamlConfiguration configuration = new YamlConfiguration(); final YamlConfigurationOptions options = new TestYamlConfigurationOptions(configuration); final KeyTree tree = new KeyTree(options); final String nodekey1 = "nodekey1"; final String nodekey2 = "nodekey2"; final String nodekey3 = "nodekey3"; tree.add(nodekey1); tree.add(nodekey2); tree.add(nodekey3); final Set<Map.Entry<String, KeyTree.Node>> entries = tree.entries(); MatcherAssert.assertThat( "There are not 3 node in the tree!", entries, new HasSize(3) ); MatcherAssert.assertThat( "The node's key are not correct!", entries.stream().map(Map.Entry::getKey) .collect(Collectors.toList()), new HasValues<>("nodekey1", "nodekey2", "nodekey3") ); }
public Set<Map.Entry<String, KeyTree.Node>> entries() { return this.nodes.entrySet(); }
KeyTree { public Set<Map.Entry<String, KeyTree.Node>> entries() { return this.nodes.entrySet(); } }
KeyTree { public Set<Map.Entry<String, KeyTree.Node>> entries() { return this.nodes.entrySet(); } KeyTree(final YamlConfigurationOptions options); }
KeyTree { public Set<Map.Entry<String, KeyTree.Node>> entries() { return this.nodes.entrySet(); } KeyTree(final YamlConfigurationOptions options); KeyTree.Node add(final String path); KeyTree.Node findParent(final int indent); KeyTree.Node get(final String path); Set<String> keys(); Set<Map.Entry<String, KeyTree.Node>> entries(); @Override String toString(); }
KeyTree { public Set<Map.Entry<String, KeyTree.Node>> entries() { return this.nodes.entrySet(); } KeyTree(final YamlConfigurationOptions options); KeyTree.Node add(final String path); KeyTree.Node findParent(final int indent); KeyTree.Node get(final String path); Set<String> keys(); Set<Map.Entry<String, KeyTree.Node>> entries(); @Override String toString();  }