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 2015/08/14 21:48:19 UTC

[2/2] incubator-tinkerpop git commit: Clean up javadoc a bit in strategies.

Clean up javadoc a bit in strategies.


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

Branch: refs/heads/tp30
Commit: 197036c82de38edf4e725d5eea5c8593298f2573
Parents: 50f7eb4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Aug 14 15:48:01 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Aug 14 15:48:01 2015 -0400

----------------------------------------------------------------------
 .../strategy/decoration/ConjunctionStrategy.java       |  3 ++-
 .../strategy/decoration/ElementIdStrategy.java         |  2 +-
 .../strategy/finalization/EngineDependentStrategy.java | 13 +++++++++----
 .../optimization/AdjacentToIncidentStrategy.java       |  6 +++---
 .../strategy/optimization/DedupBijectionStrategy.java  |  5 +++--
 .../strategy/optimization/IdentityRemovalStrategy.java |  2 +-
 .../optimization/IncidentToAdjacentStrategy.java       |  6 +++---
 .../strategy/optimization/MatchPredicateStrategy.java  |  5 +++--
 .../strategy/optimization/RangeByIsCountStrategy.java  |  2 +-
 .../verification/LambdaRestrictionStrategy.java        |  7 ++++---
 .../traversal/traverser/TraverserRequirement.java      |  8 ++++++--
 11 files changed, 36 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
index 48ae008..7bf7177 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ConjunctionStrategy.java
@@ -35,7 +35,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import java.util.Set;
 
 /**
- * ConjunctionStrategy rewrites the binary conjunction form of <code>a.and().b</code> into a {@link AndStep} of <code>and(a,b)</code> (likewise for {@link OrStep}.
+ * ConjunctionStrategy rewrites the binary conjunction form of {@code a.and().b} into a {@link AndStep} of
+ * {@code and(a,b)} (likewise for {@link OrStep}).
  * <p/>
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
index 91c6a12..2eca211 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java
@@ -48,7 +48,7 @@ import java.util.function.Supplier;
  * thus simulating that capability.
  * <p/>
  * By default, when an identifier is not supplied by the user, newly generated identifiers are {@link UUID} objects.
- * This behavior can be overriden by setting the {@link Builder#idMaker(Supplier)}.
+ * This behavior can be overridden by setting the {@link Builder#idMaker(Supplier)}.
  * <p/>
  * Unless otherwise specified the identifier is stored in the {@code __id} property.  This can be changed by setting
  * the {@link Builder#idPropertyKey(String)}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/EngineDependentStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/EngineDependentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/EngineDependentStrategy.java
index 4104c7a..27b9ce0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/EngineDependentStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/finalization/EngineDependentStrategy.java
@@ -18,19 +18,24 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.step.EngineDependent;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
 
 /**
- * A {@link org.apache.tinkerpop.gremlin.process.traversal.Step} can extend {@link EngineDependent}.
- * If it does, that means that the steps internal logic is modulated by whether the execution is via {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type#STANDARD} or {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine.Type#COMPUTER}.
- * EngineDependentStrategy simply locates all engine dependent steps and provides the respective {@link org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine}.
+ * A {@link Step} can extend {@link EngineDependent}. If it does, that means that the steps internal logic is
+ * modulated by whether the execution is via {@link Type#STANDARD} or {@link Type#COMPUTER}.
+ * {@code EngineDependentStrategy} simply locates all engine dependent steps and provides the respective
+ * {@link TraversalEngine}.
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public final class EngineDependentStrategy extends AbstractTraversalStrategy<TraversalStrategy.FinalizationStrategy> implements TraversalStrategy.FinalizationStrategy {
+public final class EngineDependentStrategy extends AbstractTraversalStrategy<TraversalStrategy.FinalizationStrategy>
+        implements TraversalStrategy.FinalizationStrategy {
 
     private static final EngineDependentStrategy INSTANCE = new EngineDependentStrategy();
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/AdjacentToIncidentStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/AdjacentToIncidentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/AdjacentToIncidentStrategy.java
index a8b11c9..c091805 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/AdjacentToIncidentStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/AdjacentToIncidentStrategy.java
@@ -41,9 +41,9 @@ import java.util.Set;
 
 /**
  * This strategy looks for vertex- and value-emitting steps followed by a {@link CountGlobalStep} and replaces the
- * pattern with an edge- or property-emitting step followed by a <code>CountGlobalStep</code>. Furthermore, if a vertex-
- * or value-emitting step is the last step in a <code>.has(traversal)</code>, <code>.and(traversal, ...)</code> or
- * <code>.or(traversal, ...)</code> child traversal, it is replaced by an appropriate edge- or property-emitting step.
+ * pattern with an edge- or property-emitting step followed by a {@code CountGlobalStep}. Furthermore, if a vertex-
+ * or value-emitting step is the last step in a {@code .has(traversal)}, {@code .and(traversal, ...)} or
+ * {@code .or(traversal, ...)} child traversal, it is replaced by an appropriate edge- or property-emitting step.
  * <p/>
  *
  * @author Daniel Kuppitz (http://gremlin.guru)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/DedupBijectionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/DedupBijectionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/DedupBijectionStrategy.java
index a26bda6..712184d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/DedupBijectionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/DedupBijectionStrategy.java
@@ -32,8 +32,9 @@ import java.util.List;
 import java.util.Set;
 
 /**
- * DedupBijectionStrategy does deduplication prior to a non-mutating bijective step if there is no <code>by()</code>-modulation on <code>dedup()</code>.
- * Given that {@link DedupGlobalStep} reduces the number of objects in the stream, it is cheaper to dedup prior.
+ * {@code DedupBijectionStrategy} does deduplication prior to a non-mutating bijective step if there is no
+ * {@code by()}-modulation on {@code dedup()}. Given that {@link DedupGlobalStep} reduces the number of
+ * objects in the stream, it is cheaper to dedup prior.
  * <p/>
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IdentityRemovalStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IdentityRemovalStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IdentityRemovalStrategy.java
index 8c106f9..142e525 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IdentityRemovalStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IdentityRemovalStrategy.java
@@ -27,7 +27,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversal
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 
 /**
- * IdentityRemovalStrategy looks for {@link IdentityStep} instances and removes them.
+ * {@code IdentityRemovalStrategy} looks for {@link IdentityStep} instances and removes them.
  * If the identity step is labeled, its labels are added to the previous step.
  * If the identity step is labeled and its the first step, in the traversal, it stays.
  * <p/>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
index 5111e74..de05aa9 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategy.java
@@ -38,12 +38,12 @@ import java.util.HashSet;
 import java.util.Set;
 
 /**
- * This strategy looks for <code>.outE().inV()</code>, <code>.inE().outV()</code> and <code>.bothE().otherV()</code>
- * and replaces these step sequences with <code>.out()</code>, <code>.in()</code> or <code>.both()</code> respectively.
+ * This strategy looks for {@code .outE().inV()}, {@code .inE().outV()} and {@code .bothE().otherV()}
+ * and replaces these step sequences with {@code .out()}, {@code .in()} or {@code .both()} respectively.
  * The strategy won't modify the traversal if:
  * <ul>
  * <li>the edge step is labeled</li>
- * <li>the traversal contains a <code>path</code> step</li>
+ * <li>the traversal contains a {@code path} step</li>
  * <li>the traversal contains a lambda step</li>
  * </ul>
  * <p/>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/MatchPredicateStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/MatchPredicateStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/MatchPredicateStrategy.java
index 3a41092..5a8a03a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/MatchPredicateStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/MatchPredicateStrategy.java
@@ -38,8 +38,9 @@ import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
- * MatchWhereStrategy will fold any post-<code>where()</code> step that maintains a traversal constraint into <code>match()</code>.
- * {@link MatchStep} is intelligent with traversal constraint applications and thus, can more efficiently use the constraint of {@link WhereTraversalStep} or {@link WherePredicateStep}.
+ * MatchWhereStrategy will fold any post-{@code where()} step that maintains a traversal constraint into
+ * {@code match()}. {@link MatchStep} is intelligent with traversal constraint applications and thus, can more
+ * efficiently use the constraint of {@link WhereTraversalStep} or {@link WherePredicateStep}.
  * <p/>
  * <p/>
  *

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
index 5bbc224..1933ced 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RangeByIsCountStrategy.java
@@ -44,7 +44,7 @@ import java.util.function.BiPredicate;
 /**
  * This strategy optimizes any occurrence of {@link CountGlobalStep} followed by an {@link IsStep}. The idea is to limit
  * the number of incoming elements in a way that it's enough for the {@link IsStep} to decide whether it evaluates
- * <code>true</code> or <code>false</code>. If the traversal already contains a user supplied limit, the strategy won't
+ * {@code true} or {@code false}. If the traversal already contains a user supplied limit, the strategy won't
  * modify it.
  *
  * @author Daniel Kuppitz (http://gremlin.guru)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java
index e614cc5..837b6db 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/LambdaRestrictionStrategy.java
@@ -28,9 +28,10 @@ import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversal
 import java.util.Comparator;
 
 /**
- * LambdaRestrictionStrategy does not allow lambdas to be used in a {@link Traversal}.
- * The contents of a lambda can not be analyzed/optimized and thus, reduces the ability of other {@link TraversalStrategy} instances to reason about the traversal.
- * This strategy is not activated by default. However, graph system vendors may choose to make this a default strategy in order to ensure their respective strategies are better able to operate.
+ * {@code LambdaRestrictionStrategy} does not allow lambdas to be used in a {@link Traversal}. The contents of a lambda
+ * cannot be analyzed/optimized and thus, reduces the ability of other {@link TraversalStrategy} instances to reason
+ * about the traversal. This strategy is not activated by default. However, graph system vendors may choose to make
+ * this a default strategy in order to ensure their respective strategies are better able to operate.
  * <p/>
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/197036c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java
index 6fd49f1..8d6c7c8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/TraverserRequirement.java
@@ -18,10 +18,14 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.traverser;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
+
 /**
- * A {@link TraverserRequirement} is a list of requirements that a {@link org.apache.tinkerpop.gremlin.process.traversal.Traversal} requires of a {@link org.apache.tinkerpop.gremlin.process.traversal.Traverser}.
+ * A {@link TraverserRequirement} is a list of requirements that a {@link Traversal} requires of a {@link Traverser}.
  * The less requirements, the simpler the traverser can be (both in terms of space and time constraints).
- * Every {@link org.apache.tinkerpop.gremlin.process.traversal.Step} provides its specific requirements via {@link org.apache.tinkerpop.gremlin.process.traversal.Step#getRequirements()}.
+ * Every {@link Step} provides its specific requirements via {@link Step#getRequirements()}.
  *
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */