Package com.tinkerpop.gremlin.process

Examples of com.tinkerpop.gremlin.process.Path


        int count = 0;
        final Map<String, Long> firstStepCounts = new HashMap<>();
        final Map<String, Long> secondStepCounts = new HashMap<>();
        while (traversal.hasNext()) {
            count++;
            Path path = traversal.next();
            String first = path.get(0).toString();
            String second = path.get(1).toString();
            assertThat(first, not(second));
            MapHelper.incr(firstStepCounts, first, 1l);
            MapHelper.incr(secondStepCounts, second, 1l);
        }
        assertEquals(6, count);
View Full Code Here


        this.functionRing = (pathFunctions.length == 0) ? null : new FunctionRing(pathFunctions);
        this.setFunction(traverser -> {
            if (null == this.functionRing)
                return traverser.path();
            else {
                final Path path = MutablePath.make();
                traverser.path().forEach((labels, object) -> path.extend(labels, this.functionRing.next().apply(object)));
                this.functionRing.reset();
                return path;
            }
        });
    }
View Full Code Here

            path = path.extend(this.labels.get(i), this.objects.get(i));
        }
        return path;*/

        final Path path = MutablePath.make();
        this.forEach((labels, object) -> {
            if (object instanceof Attachable) {
                path.extend(labels, ((Attachable) object).attach(hostGraph));
            } else {
                path.extend(labels, object);
            }
        });
        return path;
    }
View Full Code Here

            }

            path = path.extend(this.labels.get(i), this.objects.get(i));
        }
        return path;*/
        final Path path = MutablePath.make();
        this.forEach((labels, object) -> {
            if (object instanceof Attachable) {
                path.extend(labels, ((Attachable) object).attach(hostVertex));
            } else {
                path.extend(labels, object);
            }
        });
        return path;
    }
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.process.Path

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.