Fix typos
This commit is contained in:
parent
f95029d348
commit
a31c4501ac
2 changed files with 4 additions and 1 deletions
|
@ -92,6 +92,7 @@ public interface Node<T> {
|
|||
* Creates a new named node and adds it as a child of the current node.
|
||||
*
|
||||
* @param child the child node's data
|
||||
* @param name the name
|
||||
*
|
||||
* @return the new child node
|
||||
*/
|
||||
|
|
|
@ -190,6 +190,7 @@ public class NodeItem<T> implements Node<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("hiddenfield")
|
||||
public Node<T> createChild(final T child, final String name) {
|
||||
Node<T> node = createChild(child);
|
||||
node.setName(name);
|
||||
|
@ -249,8 +250,9 @@ public class NodeItem<T> implements Node<T> {
|
|||
@Override
|
||||
public Node<T> getChild(final T child) {
|
||||
Optional<Node<T>> optional = findChild(child);
|
||||
if (optional.isPresent())
|
||||
if (optional.isPresent()) {
|
||||
return optional.get();
|
||||
}
|
||||
throw new NodeException("Child not found");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue