From 081dfc7b377aad2cdd270a82366eb8e8a33dcd26 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 18 Feb 2017 18:25:03 +0000 Subject: [PATCH] Node: {streamParents => parentStream} rename method --- src/main/java/net/kemitix/node/Node.java | 2 +- src/main/java/net/kemitix/node/NodeItem.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/kemitix/node/Node.java b/src/main/java/net/kemitix/node/Node.java index 3e70032..4a0e67a 100644 --- a/src/main/java/net/kemitix/node/Node.java +++ b/src/main/java/net/kemitix/node/Node.java @@ -256,5 +256,5 @@ public interface Node { * * @return a stream of the node's parents recursively until the root node */ - Stream> streamParents(); + Stream> parentStream(); } diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index 5b75c0a..d876c8f 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -377,8 +377,8 @@ class NodeItem implements Node { } @Override - public Stream> streamParents() { - return getParent().map(node -> Stream.concat(Stream.of(node), node.streamParents())) - .orElseGet(Stream::empty); + public Stream> parentStream() { + return findParent().map(node -> Stream.concat(Stream.of(node), node.parentStream())) + .orElseGet(Stream::empty); } }