You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/06/23 17:07:48 UTC
incubator-tinkerpop git commit: Scoping.getScopedValueByKey() always
requires a Pop -- there are no steps that use the non-pop'd form and for
steps, its too random to not declare a pop. Thus,
deleted two methods in Scoping.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 161250061 -> b410bf718
Scoping.getScopedValueByKey() always requires a Pop -- there are no steps that use the non-pop'd form and for steps, its too random to not declare a pop. Thus, deleted two methods in Scoping.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/b410bf71
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/b410bf71
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/b410bf71
Branch: refs/heads/master
Commit: b410bf7180cc262fae3dd6aa38d3e5c3d5283117
Parents: 1612500
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jun 23 09:07:44 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jun 23 09:07:44 2015 -0600
----------------------------------------------------------------------
.../gremlin/process/traversal/step/Scoping.java | 8 --------
.../process/traversal/step/map/AddEdgeStep.java | 13 +++++++------
2 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b410bf71/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
index ddb06a6..13d17cd 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Scoping.java
@@ -78,14 +78,6 @@ public interface Scoping {
}
}
- public default <S> S getScopeValueByKey(final String key, final Traverser.Admin<?> traverser) throws IllegalArgumentException {
- return this.getScopeValueByKey(null, key, traverser);
- }
-
- public default <S> Optional<S> getOptionalScopeValueByKey(final String key, final Traverser.Admin<?> traverser) {
- return this.getOptionalScopeValueByKey(null, key, traverser);
- }
-
public Scope getScope();
public Scope recommendNextScope();
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b410bf71/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
index e755454..b07b13f 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
@@ -18,6 +18,7 @@
*/
package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+import org.apache.tinkerpop.gremlin.process.traversal.Pop;
import org.apache.tinkerpop.gremlin.process.traversal.Scope;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
@@ -44,8 +45,8 @@ import java.util.Set;
*/
public final class AddEdgeStep<S> extends FlatMapStep<S, Edge> implements Scoping, Mutating<Event.EdgeAddedEvent> {
- private static final Set<TraverserRequirement> LOCAL_REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT);
- private static final Set<TraverserRequirement> GLOBAL_REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT, TraverserRequirement.PATH, TraverserRequirement.SIDE_EFFECTS);
+ private static final Set<TraverserRequirement> LOCAL_REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT, TraverserRequirement.SIDE_EFFECTS);
+ private static final Set<TraverserRequirement> GLOBAL_REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT, TraverserRequirement.SIDE_EFFECTS, TraverserRequirement.PATH);
private Scope scope;
private final Direction direction;
@@ -67,7 +68,7 @@ public final class AddEdgeStep<S> extends FlatMapStep<S, Edge> implements Scopin
}
public Direction getDirection() {
- return direction;
+ return this.direction;
}
public String getFirstVertexKey() {
@@ -75,7 +76,7 @@ public final class AddEdgeStep<S> extends FlatMapStep<S, Edge> implements Scopin
}
public String getEdgeLabel() {
- return edgeLabel;
+ return this.edgeLabel;
}
public String getSecondVertexKey() {
@@ -88,8 +89,8 @@ public final class AddEdgeStep<S> extends FlatMapStep<S, Edge> implements Scopin
@Override
protected Iterator<Edge> flatMap(final Traverser.Admin<S> traverser) {
- final Object firstVertex = null == this.firstVertexKey ? (Vertex) traverser.get() : this.getScopeValueByKey(this.firstVertexKey, traverser);
- final Object secondVertex = null == this.secondVertexKey ? (Vertex) traverser.get() : this.getScopeValueByKey(this.secondVertexKey, traverser);
+ final Object firstVertex = null == this.firstVertexKey ? (Vertex) traverser.get() : this.getScopeValueByKey(Pop.last, this.firstVertexKey, traverser);
+ final Object secondVertex = null == this.secondVertexKey ? (Vertex) traverser.get() : this.getScopeValueByKey(Pop.last, this.secondVertexKey, traverser);
final Object finalFirstVertex = firstVertex instanceof Iterable ? ((Iterable) firstVertex).iterator() : firstVertex;
final Object finalSecondVertex = secondVertex instanceof Iterable ? ((Iterable) secondVertex).iterator() : secondVertex;