You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/01/23 07:16:44 UTC

[isis] branch v2 updated: ISIS-898: adds javadoc for TreeAdapter

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/v2 by this push:
     new cfc56eb  ISIS-898: adds javadoc for TreeAdapter
cfc56eb is described below

commit cfc56eb0973bccc29483691faba77904740bc1ae
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Jan 23 08:16:37 2019 +0100

    ISIS-898: adds javadoc for TreeAdapter
---
 .../org/apache/isis/applib/tree/TreeAdapter.java     | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/tree/TreeAdapter.java b/core/applib/src/main/java/org/apache/isis/applib/tree/TreeAdapter.java
index 8d5c924..de1730f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/tree/TreeAdapter.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/tree/TreeAdapter.java
@@ -21,12 +21,32 @@ package org.apache.isis.applib.tree;
 import java.util.Optional;
 import java.util.stream.Stream;
 
+/**
+ * Provides the parent/child relationship information between pojos 
+ * to derive a tree-structure. 
+ * 
+ * @param <T> type of the tree nodes that make up the tree structure
+ * 
+ * @since 2.0.0-M2
+ */
 public interface TreeAdapter<T> {
 
+    /**
+     * @param value - tree-node (pojo) 
+     * @return the parent tree-node (pojo) of the specified {@code value} tree-node (pojo)
+     */
     public Optional<T> parentOf(T value);
 
+    /**
+     * @param value - tree-node (pojo)
+     * @return number of child tree-nodes of the specified {@code value} tree-node (pojo)
+     */
     public int childCountOf(T value);
 
+    /**
+     * @param value - tree-node (pojo)
+     * @return stream of child tree-nodes of the specified {@code value} tree-node (pojo)
+     */
     public Stream<T> childrenOf(T value);
 
 }