README.md: fix typo
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
parent
749dd506ad
commit
1f508bc3d2
1 changed files with 3 additions and 2 deletions
|
@ -23,11 +23,12 @@ The library consits of an interface `Node` and an implementation `NodeItem`.
|
|||
|
||||
## Add a child node
|
||||
|
||||
root.createChild("child");
|
||||
Node<String> child = root.createChild("child");
|
||||
|
||||
Which is shorthand for:
|
||||
|
||||
root.addChild(new NodeItem<>("child"));
|
||||
Node<String> child = new NodeItem<>("child");
|
||||
root.addChild(child);
|
||||
|
||||
The tree now looks like:
|
||||
|
||||
|
|
Loading…
Reference in a new issue