You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/02/17 17:48:09 UTC

[3/4] tinkerpop git commit: Added javadoc for tree/group/groupCount CTR

Added javadoc for tree/group/groupCount CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9a0737be
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9a0737be
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9a0737be

Branch: refs/heads/tp32
Commit: 9a0737bef9a9630f8d0973fc031fe1f348da894a
Parents: 92c82e0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 17 12:15:03 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 17 12:15:03 2017 -0500

----------------------------------------------------------------------
 .../traversal/dsl/graph/GraphTraversal.java     | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9a0737be/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index da0f9da..570c52b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -870,6 +870,13 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
         return this.asAdmin().addStep(scope.equals(Scope.global) ? new MeanGlobalStep<>(this.asAdmin()) : new MeanLocalStep(this.asAdmin()));
     }
 
+    /**
+     * Organize objects in the stream into a {@code Map}. Calls to {@code group()} are typically accompanied with
+     * {@link #by()} modulators which help specify how the grouping should occur.
+     *
+     * @return the traversal with an appended {@link GroupStep}.
+     * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#group-step">Reference Documentation - Group Step</a>
+     */
     public default <K, V> GraphTraversal<S, Map<K, V>> group() {
         this.asAdmin().getBytecode().addStep(Symbols.group);
         return this.asAdmin().addStep(new GroupStep<>(this.asAdmin()));
@@ -884,11 +891,24 @@ public interface GraphTraversal<S, E> extends Traversal<S, E> {
         return this.asAdmin().addStep(new GroupStepV3d0<>(this.asAdmin()));
     }
 
+    /**
+     * Counts the number of times a particular objects has been part of a traversal, returning a {@code Map} where the
+     * object is the key and the value is the count.
+     *
+     * @return the traversal with an appended {@link GroupCountStep}.
+     * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#groupcount-step">Reference Documentation - GroupCount Step</a>
+     */
     public default <K> GraphTraversal<S, Map<K, Long>> groupCount() {
         this.asAdmin().getBytecode().addStep(Symbols.groupCount);
         return this.asAdmin().addStep(new GroupCountStep<>(this.asAdmin()));
     }
 
+    /**
+     * Aggregates the emanating paths into a {@link Tree} data structure.
+     *
+     * @return the traversal with an appended {@link TreeStep}
+     * @see <a target="_blank" href="http://tinkerpop.apache.org/docs/${project.version}/reference/#tree-step">Reference Documentation - Tree Step</a>
+     */
     public default GraphTraversal<S, Tree> tree() {
         this.asAdmin().getBytecode().addStep(Symbols.tree);
         return this.asAdmin().addStep(new TreeStep<>(this.asAdmin()));