You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/10/27 18:06:44 UTC
[2/4] incubator-tinkerpop git commit: implemented
GraphStep::hashCode()
implemented GraphStep::hashCode()
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/c35d08f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/c35d08f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/c35d08f2
Branch: refs/heads/TINKERPOP3-762
Commit: c35d08f255f4cdd4d498765291a08748423db460
Parents: 7b18447
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Oct 27 15:47:42 2015 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Oct 27 15:47:42 2015 +0100
----------------------------------------------------------------------
.../gremlin/process/traversal/step/map/GraphStep.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/c35d08f2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
index 3a84281..de3e669 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java
@@ -136,4 +136,14 @@ public class GraphStep<S, E extends Element> extends AbstractStep<S, E> implemen
this.head = null;
this.iterator = EmptyIterator.instance();
}
+
+
+ @Override
+ public int hashCode() {
+ int result = super.hashCode() ^ this.returnClass.hashCode();
+ for (final Object id : this.ids) {
+ result ^= id.hashCode();
+ }
+ return result;
+ }
}