Interface GraphTraversal<S,E>
- All Superinterfaces:
AutoCloseable,Cloneable,Iterator<E>,Serializable,Traversal<S,E>
- All Known Subinterfaces:
CredentialTraversal<S,,E> CredentialTraversalDsl<S,,E> GraphTraversal.Admin<S,E>
- All Known Implementing Classes:
DefaultCredentialTraversal,DefaultGraphTraversal
- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceExposes administrative methods that are either internal to TinkerPop or for users with advanced needs.static final classNested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal
Traversal.Exceptions -
Method Summary
Modifier and TypeMethodDescriptiondefault GraphTraversal<S,Edge> Adds anEdgewith the specified edge label.default GraphTraversal<S,Edge> Adds anEdgewith the specified edge label.default GraphTraversal<S,Edge> default GraphTraversal<S,E> Adds labels to the current element.default GraphTraversal<S,E> Adds labels to the current element.default GraphTraversal<S,Vertex> addV()Adds aVertexwith a default vertex label.default GraphTraversal<S,Vertex> Adds aVertex.default GraphTraversal<S,Vertex> Adds aVertex.default GraphTraversal<S,Vertex> default GraphTraversal<S,E> Eagerly collects objects up to this step into a side-effect.default <S2> GraphTraversal<S,E> FiltersElists given the providedpredicate.default GraphTraversal<S,E> Ensures that all of the provided traversals yield a result.default <S2> GraphTraversal<S,E> FiltersElists given the providedpredicate.default GraphTraversal<S,E> A step modulator that provides a label to the step that can be accessed later in the traversal by other steps.default GraphTraversal.Admin<S,E> asAdmin()Get access to administrative methods of the traversal via its accompanyingTraversal.Admin.default GraphTraversal<S,Boolean> asBool()Parse the incoming traverser as a boolean value.default GraphTraversal<S,OffsetDateTime> asDate()Parse value of the incoming traverser as an ISO-8601OffsetDateTime.default GraphTraversal<S,Number> asNumber()Parse value of the incoming traverser as aNumber.default GraphTraversal<S,Number> Parse value of the incoming traverser as aNumber.default GraphTraversal<S,String> asString()Returns the value of incoming traverser as strings.default <E2> GraphTraversal<S,E2> Returns the value of incoming traverser as strings.default GraphTraversal<S,E> barrier()Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier.default GraphTraversal<S,E> barrier(int maxBarrierSize) Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier.default GraphTraversal<S,E> barrier(Consumer<TraverserSet<Object>> barrierConsumer) Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier.default GraphTraversal<S,Vertex> both()Map theVertexto its adjacent vertices.default GraphTraversal<S,Vertex> Map theVertexto its adjacent vertices given the edge labels.default GraphTraversal<S,Vertex> Map theVertexto its adjacent vertices given the edge labels.default GraphTraversal<S,Edge> bothE()Map theVertexto its incident edges.default GraphTraversal<S,Edge> Map theVertexto its incident edges given the edge labels.default GraphTraversal<S,Edge> Map theVertexto its incident edges given the edge labels.default GraphTraversal<S,Vertex> bothV()Map theEdgeto its incident vertices.default <M,E2> GraphTraversal<S, E2> Split theTraverserto all the specified functions.default <M,E2> GraphTraversal<S, E2> Split theTraverserto all the specified traversals.default GraphTraversal<S,E> by()Theby()can be applied to a number of different step to alter their behaviors.default GraphTraversal<S,E> Theby()can be applied to a number of different step to alter their behaviors.default <V> GraphTraversal<S,E> by(String key, Comparator<V> comparator) Theby()can be applied to a number of different step to alter their behaviors.default GraphTraversal<S,E> by(Comparator<E> comparator) Theby()can be applied to a number of different step to alter their behaviors.default <U> GraphTraversal<S,E> by(Function<U, Object> function, Comparator comparator) Theby()can be applied to a number of different step to alter their behaviors.default <V> GraphTraversal<S,E> Theby()can be applied to a number of different step to alter their behaviors.default GraphTraversal<S,E> Theby()can be applied to a number of different step to alter their behaviors.default GraphTraversal<S,E> Theby()can be applied to a number of different step to alter their behaviors.default <V> GraphTraversal<S,E> by(Traversal<?, ?> traversal, Comparator<V> comparator) Theby()can be applied to a number of different step to alter their behaviors.default GraphTraversal<S,E> Theby()can be applied to a number of different step to alter their behaviors.default <E> GraphTraversal<S,E> Perform the specified service call with no parameters.default <E> GraphTraversal<S,E> Perform the specified service call with the specified static parameters.default <E> GraphTraversal<S,E> Perform the specified service call with both static and dynamic parameters produced by the specified child traversal.default <E> GraphTraversal<S,E> Perform the specified service call with the specified static parameters.default <E> GraphTraversal<S,E> Perform the specified service call with both static and dynamic parameters produced by the specified child traversal.default <E> GraphTraversal<S,E> Perform the specified service call with dynamic parameters produced by the specified child traversal.default <E2> GraphTraversal<S,E2> Iterates the traversal up to the itself and emits the side-effect referenced by the key.default <M,E2> GraphTraversal<S, E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <M,E2> GraphTraversal<S, E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <E2> GraphTraversal<S,E2> Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.default <E2> GraphTraversal<S,E2> Evaluates the provided traversals and returns the result of the first traversal to emit at least one object.default GraphTraversal<S,E> coin(double probability) Filter theEobject given a biased coin toss.default GraphTraversal<S,E> Filter theEobject given a biased coin toss.default GraphTraversal<S,List<?>> Combines the list traverser and list argument.default GraphTraversal<S,String> Concatenate an arbitrary number of strings to the incoming traverser.default GraphTraversal<S,String> Concatenate values of an arbitrary number of string traversals to the incoming traverser.default GraphTraversal<S,String> Joins together the elements of the incoming list traverser together with the provided delimiter.default GraphTraversal<S,E> Executes a Connected Component algorithm over the graph.default <E2> GraphTraversal<S,E2> constant(E2 e) Map any object to a fixedEvalue.default <E2> GraphTraversal<S,E2> Map any object to a fixedEvalue.default GraphTraversal<S,Long> count()Map the traversal stream to its reduction as a sum of theTraverser.bulk()values (i.e.default GraphTraversal<S,Long> Map the traversal stream to its reduction as a sum of theTraverser.bulk()values given the specifiedScope(i.e.default GraphTraversal<S,E> default GraphTraversal<S,OffsetDateTime> Increase value of inputOffsetDateTime.default GraphTraversal<S,Long> dateDiff(OffsetDateTime value) Returns the difference between twoOffsetDateTimein epoch time.default GraphTraversal<S,Long> Deprecated.default GraphTraversal<S,Long> Returns the difference between two dates in epoch time.default GraphTraversal<S,E> Remove all duplicates in the traversal stream up to this point.default GraphTraversal<S,E> Remove all duplicates in the traversal stream up to this point.default GraphTraversal<S,Set<?>> difference(Object values) Calculates the difference between the list traverser and list argument.default GraphTraversal<S,E> discard()Filter all traversers in the traversal.default GraphTraversal<S,Set<?>> Calculates the disjunction between the list traverser and list argument.default GraphTraversal<S,E> drop()Removes elements and properties from the graph.default GraphTraversal<S,E> Removes labels from the current element.default GraphTraversal<S,E> Removes labels from the current element.default GraphTraversal<S,E> Removes all labels from the current element, triggering the provider's default label behavior.default GraphTraversal<S,Edge> AEstep is usually used to start a traversal but it may also be used mid-traversal.default GraphTraversal<S,Edge> AEstep that accepts a child traversal whose results are used as edge IDs for lookup.default GraphTraversal<S,Element> element()default <E2> GraphTraversal<S,Map<Object, E2>> elementMap(String... propertyKeys) default GraphTraversal<S,E> emit()Emit is used in conjunction withrepeat(Traversal)to emit all objects from the loop.default GraphTraversal<S,E> Emit is used in conjunction withrepeat(Traversal)to determine what objects get emit from the loop.default GraphTraversal<S,E> Emit is used in conjunction withrepeat(Traversal)to determine what objects get emit from the loop.default GraphTraversal<S,E> fail()When triggered, immediately throws aRuntimeExceptionwhich implements theFailureinterface.default GraphTraversal<S,E> When triggered, immediately throws aRuntimeExceptionwhich implements theFailureinterface.default GraphTraversal<S,E> Map theTraverserto eithertrueorfalse, wherefalsewill not pass the traverser to the next step.default GraphTraversal<S,E> Map theTraverserto eithertrueorfalse, wherefalsewill not pass the traverser to the next step.default <E2> GraphTraversal<S,E2> default <E2> GraphTraversal<S,E2> default GraphTraversal<S,List<E>> fold()Rolls up objects in the stream into an aggregate list.default <E2> GraphTraversal<S,E2> fold(E2 seed, BiFunction<E2, E, E2> foldFunction) Rolls up objects in the stream into an aggregate value as defined by aseedandBiFunction.default GraphTraversal<S,String> A mid-traversal step which will handle result formatting to string values.default GraphTraversal<S,E> Providefrom()-modulation to respective steps.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.default <K,V> GraphTraversal<S, Map<K, V>> group()Organize objects in the stream into aMap.default GraphTraversal<S,E> Organize objects in the stream into aMap.default <K> GraphTraversal<S,Map<K, Long>> Counts the number of times a particular objects has been part of a traversal, returning aMapwhere the object is the key and the value is the count.default GraphTraversal<S,E> groupCount(String sideEffectKey) Counts the number of times a particular objects has been part of a traversal, returning aMapwhere the object is the key and the value is the count.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on the existence of properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their label and a property value resolved from a child traversal at runtime.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties using a child traversal whose results are resolved at runtime against the current traverser.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their properties using a child traversal whose results are resolved at runtime against the current traverser.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their identifier.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their identifier.default GraphTraversal<S,E> FiltersPropertyobjects based on their key.default GraphTraversal<S,E> FiltersPropertyobjects based on their key.default GraphTraversal<S,E> FiltersPropertyobjects based on their key using a child traversal whose results are resolved at runtime against the current traverser.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their label.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their label.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their label.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on their label using a child traversal whose results are resolved at runtime against the current traverser.default GraphTraversal<S,E> Filters vertices, edges and vertex properties based on the non-existence of properties.default GraphTraversal<S,E> FiltersPropertyobjects based on their value.default GraphTraversal<S,E> FiltersPropertyobjects based on their value.Note that calling this step withnullis the same as callinghasValue(Object, Object...)with a singlenull.default GraphTraversal<S,E> FiltersPropertyobjects based on their value using a child traversal whose results are resolved at runtime against the current traverser.default GraphTraversal<S,Object> id()Map theElementto itsElement.id().default GraphTraversal<S,E> identity()Map theEobject to itself.default GraphTraversal<S,Vertex> in()Map theVertexto its incoming adjacent vertices.default GraphTraversal<S,Vertex> Map theVertexto its incoming adjacent vertices given the edge labels.default GraphTraversal<S,Vertex> Map theVertexto its incoming adjacent vertices given the edge labels.default <E2> GraphTraversal<S,E2> index()Indexes all items of the current collection.default GraphTraversal<S,Edge> inE()Map theVertexto its incoming incident edges.default GraphTraversal<S,Edge> Map theVertexto its incoming incident edges given the edge labels.default GraphTraversal<S,Edge> Map theVertexto its incoming incident edges given the edge labels.default GraphTraversal<S,E> Provides a way to add arbitrary objects to a traversal stream.default GraphTraversal<S,Set<?>> Calculates the intersection between the list traverser and list argument.default GraphTraversal<S,Vertex> inV()default GraphTraversal<S,E> Filter theEobject if it is notP.eq(V)to the provided value.default GraphTraversal<S,E> FiltersEobject values given the providedpredicate.default GraphTraversal<S,E> iterate()Iterates the traversal presumably for the generation of side-effects.default GraphTraversal<S,String> key()Map thePropertyto itsProperty.key().default GraphTraversal<S,String> label()Deprecated.As of release 4.0.0, replaced bylabels().default GraphTraversal<S,String> labels()Map theElementto its labels, emitting each label as a separate traverser.default GraphTraversal<S,Integer> length()Returns the length incoming string traverser.default <E2> GraphTraversal<S,E2> Returns the length incoming string or list.default GraphTraversal<S,E> limit(long limit) Filter the objects in the traversal by the number of them to pass through the stream, where only the firstnobjects are allowed as defined by thelimitargument.default <E2> GraphTraversal<S,E2> Filter the objects in the traversal by the number of them to pass through the stream given theScope, where only the firstnobjects are allowed as defined by thelimitargument.default <E2> GraphTraversal<S,E2> Filter the objects in the traversal by the number of them to pass through the stream given theScope, where only the firstnobjects are allowed as defined by thelimitargument.default GraphTraversal<S,E> Filter the objects in the traversal by the number of them to pass through the stream, where only the firstnobjects are allowed as defined by thelimitargument.default <E2> GraphTraversal<S,E2> Provides a execute a specified traversal on a single element within a stream.default GraphTraversal<S,Integer> loops()If theTraversersupports looping then calling this method will extract the number of loops for that traverser.default GraphTraversal<S,Integer> If theTraversersupports looping then calling this method will extract the number of loops for that traverser for the named loop.default GraphTraversal<S,String> lTrim()Returns a string with leading whitespace removed.default <E2> GraphTraversal<S,E2> Returns a string with leading whitespace removed.default <E2> GraphTraversal<S,E2> default <E2> GraphTraversal<S,E2> default GraphTraversal<S,Map<String, Object>> Map theTraverserto a result using a declarative query string.default GraphTraversal<S,Map<String, Object>> Map theTraverserto a result using a declarative query string with bound parameters.default <E2> GraphTraversal<S,Map<String, E2>> Deprecated.As of release 4.0.0, replaced bymatch(String)for declarative pattern matching.default GraphTraversal<S,Double> default <E2 extends Comparable>
GraphTraversal<S,E2> max()Determines the largest value in the stream.default <E2 extends Comparable>
GraphTraversal<S,E2> Determines the largest value in the stream given theScope.default <E2 extends Number>
GraphTraversal<S,E2> mean()Determines the mean value in the stream.default <E2 extends Number>
GraphTraversal<S,E2> Determines the mean value in the stream given theScope.default <E2> GraphTraversal<S,E2> Merges the list traverser and list argument.default GraphTraversal<S,Edge> mergeE()Spawns aGraphTraversalby doing a merge (i.e.default GraphTraversal<S,Edge> Spawns aGraphTraversalby doing a merge (i.e.default GraphTraversal<S,Edge> Spawns aGraphTraversalby doing a merge (i.e.default GraphTraversal<S,Edge> Spawns aGraphTraversalby doing a merge (i.e.default GraphTraversal<S,Vertex> mergeV()Performs a merge (i.e.default GraphTraversal<S,Vertex> Performs a merge (i.e.default GraphTraversal<S,Vertex> Performs a merge (i.e.default GraphTraversal<S,Vertex> Performs a merge (i.e.default <E2 extends Comparable>
GraphTraversal<S,E2> min()Determines the smallest value in the stream.default <E2 extends Comparable>
GraphTraversal<S,E2> Determines the smallest value in the stream given theScope.default <S2> GraphTraversal<S,E> FiltersElists given the providedpredicate.default GraphTraversal<S,E> Removes objects from the traversal stream when the traversal provided as an argument returns any objects.default <M,E2> GraphTraversal<S, E> This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step.default <M,E2> GraphTraversal<S, E> This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step.default <M,E2> GraphTraversal<S, E> This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step.default <M,E2> GraphTraversal<S, E> This is a step modulator tomergeV()where the provided argument associated to thetokenis applied according to the semantics of the step.default <E2> GraphTraversal<S,E> This step modifieschoose(Function)to specifies the available choices that might be executed.default <E2> GraphTraversal<S,E2> Returns the result of the specified traversal if it yields a result, otherwise it returns the calling element.default GraphTraversal<S,E> Ensures that at least one of the provided traversals yield a result.default GraphTraversal<S,E> order()Order all the objects in the traversal up to this point and then emit them one-by-one in their ordered sequence.default GraphTraversal<S,E> Order either theScope.localobject (e.g.default GraphTraversal<S,Vertex> otherV()Map theEdgeto the incident vertex that was not just traversed from in the path history.default GraphTraversal<S,Vertex> out()Map theVertexto its outgoing adjacent vertices.default GraphTraversal<S,Vertex> Map theVertexto its outgoing adjacent vertices given the edge labels.default GraphTraversal<S,Vertex> Map theVertexto its outgoing adjacent vertices given the edge labels.default GraphTraversal<S,Edge> outE()Map theVertexto its outgoing incident edges.default GraphTraversal<S,Edge> Map theVertexto its outgoing incident edges given the edge labels.default GraphTraversal<S,Edge> Map theVertexto its outgoing incident edges given the edge labels.default GraphTraversal<S,Vertex> outV()default GraphTraversal<S,E> pageRank()Calculates a PageRank over the graph using a 0.85 for thealphavalue.default GraphTraversal<S,E> pageRank(double alpha) Calculates a PageRank over the graph.default GraphTraversal<S,Path> path()default GraphTraversal<S,E> Executes a Peer Pressure community detection algorithm over the graph.default GraphTraversal<S,List<List<?>>> Calculates the cartesian product between the list traverser and list argument.default GraphTraversal<S,TraversalMetrics> profile()Allows developers to examine statistical information about a traversal providing data like execution times, counts, etc.default GraphTraversal<S,E> Allows developers to examine statistical information about a traversal providing data like execution times, counts, etc.default GraphTraversal<S,E> program(VertexProgram<?> vertexProgram) Executes an arbitraryVertexProgramover the graph.default <E2> GraphTraversal<S,Map<String, E2>> Projects the current object in the stream into aMapthat is keyed by the provided labels.default <E2> GraphTraversal<S,? extends Property<E2>> properties(String... propertyKeys) Map theElementto its associated properties given the provide property keys.default GraphTraversal<S,E> Sets the key and value of aProperty.default GraphTraversal<S,E> When aMapis supplied then each of the key/value pairs in the map will be added as property.default GraphTraversal<S,E> Sets properties on the current element using a child traversal that produces aMap.default GraphTraversal<S,E> property(VertexProperty.Cardinality cardinality, Object key, Object value, Object... keyValues) Sets aPropertyvalue and related meta properties if supplied, if supported by theGraphand if theElementis aVertexProperty.default <E2> GraphTraversal<S,Map<String, E2>> propertyMap(String... propertyKeys) default GraphTraversal<S,E> range(long low, long high) Filter the objects in the traversal by the number of them to pass through the stream.default <E2> GraphTraversal<S,E2> Filter the objects in the traversal by the number of them to pass through the stream as constrained by theScope.default <E2> GraphTraversal<S,E2> Filter the objects in the traversal by the number of them to pass through the stream as constrained by theScope.default GraphTraversal<S,E> Filter the objects in the traversal by the number of them to pass through the stream.default GraphTraversal<S,E> read()This step is technically a step modulator for the theGraphTraversalSource.io(String)step which instructs the step to perform a read with its given configuration.default GraphTraversal<S,E> This step is used for looping over a traversal given some break predicate and with a specified loop name.default GraphTraversal<S,E> This step is used for looping over a traversal given some break predicate.default GraphTraversal<S,String> Returns a string with the specified characters in the original string replaced with the new characters.default <E2> GraphTraversal<S,E2> Returns a string with the specified characters in the original string replaced with the new characters.default <E2> GraphTraversal<S,E2> reverse()Returns the reverse of the incoming traverser.default GraphTraversal<S,String> rTrim()Returns a string with trailing whitespace removed.default <E2> GraphTraversal<S,E2> Returns a string with trailing whitespace removed.default <E2> GraphTraversal<S,E2> sack()Map theTraverserto itsTraverser.sack()value.default <V,U> GraphTraversal<S, E> sack(BiFunction<V, U, V> sackOperator) Map theTraverserto itsTraverser.sack()value.default GraphTraversal<S,E> sample(int amountToSample) Allow some specified number of objects to pass through the stream.default GraphTraversal<S,E> Allow some specified number of objects to pass through the stream.default <E2> GraphTraversal<S,E2> Map theTraverserto the object specified by theselectKey.default <E2> GraphTraversal<S,Map<String, E2>> default <E2> GraphTraversal<S,E2> default <E2> GraphTraversal<S,Map<String, E2>> default <E2> GraphTraversal<S,E2> default <E2> GraphTraversal<S,E2> Map theTraverserto the object specified by the key returned by thekeyTraversal.default <E2> GraphTraversal<S,Collection<E2>> A version ofselectthat allows for the extraction of aColumnfrom objects in the traversal.default GraphTraversal<S,Path> Executes a Shortest Path algorithm over the graph.default GraphTraversal<S,E> sideEffect(Consumer<Traverser<E>> consumer) Perform some operation on theTraverserand pass it to the next step unmodified.default GraphTraversal<S,E> sideEffect(Traversal<?, ?> sideEffectTraversal) Perform some operation on theTraverserand pass it to the next step unmodified.default GraphTraversal<S,E> default GraphTraversal<S,E> skip(long skip) Filters out the firstnobjects in the traversal.default <E2> GraphTraversal<S,E2> Filters out the firstnobjects in the traversal.default <E2> GraphTraversal<S,E2> Filters out the firstnobjects in the traversal.default GraphTraversal<S,E> Filters out the firstnobjects in the traversal.default GraphTraversal<S,List<String>> Returns a list of strings created by splitting the incoming string traverser around the matches of the given separator.default <E2> GraphTraversal<S,List<E2>> Returns a list of strings created by splitting the incoming string traverser around the matches of the given separator.default GraphTraversal<S,Edge> Extracts a portion of the graph being traversed into aGraphobject held in the specified side-effect key.default GraphTraversal<S,String> substring(int startIndex) Returns a substring of the incoming string traverser with a 0-based start index (inclusive) specified, to the end of the string.default GraphTraversal<S,String> substring(int startIndex, int endIndex) Returns a substring of the incoming string traverser with a 0-based start index (inclusive) and end index (exclusive).default <E2> GraphTraversal<S,E2> Returns a substring of the incoming string traverser with a 0-based start index (inclusive) specified, to the end of the string.default <E2> GraphTraversal<S,E2> Returns a substring of the incoming string traverser with a 0-based start index (inclusive) and end index (exclusive).default <E2 extends Number>
GraphTraversal<S,E2> sum()Map the traversal stream to its reduction as a sum of theTraverser.get()values multiplied by theirTraverser.bulk()(i.e.default <E2 extends Number>
GraphTraversal<S,E2> Map the traversal stream to its reduction as a sum of theTraverser.get()values multiplied by theirTraverser.bulk()given the specifiedScope(i.e.default GraphTraversal<S,E> tail()Filters the objects in the traversal emitted as being last objects in the stream.default GraphTraversal<S,E> tail(long limit) Filters the objects in the traversal emitted as being last objects in the stream.default <E2> GraphTraversal<S,E2> Filters the objects in the traversal emitted as being last objects in the stream given theScope.default <E2> GraphTraversal<S,E2> Filters the objects in the traversal emitted as being last objects in the stream given theScope.default <E2> GraphTraversal<S,E2> Filters the objects in the traversal emitted as being last objects in the stream given theScope.default GraphTraversal<S,E> Filters the objects in the traversal emitted as being last objects in the stream.default GraphTraversal<S,E> timeLimit(long timeLimit) Once the firstTraverserhits this step, a count down is started.default GraphTraversal<S,E> times(int maxLoops) Modifies arepeat(Traversal)to specify how many loops should occur before exiting.default GraphTraversal<S,E> Provideto()-modulation to respective steps.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.default GraphTraversal<S,Vertex> Map theVertexto its adjacent vertices given a direction.default GraphTraversal<S,Vertex> Map theVertexto its adjacent vertices given a direction and edge labels.default GraphTraversal<S,Vertex> Map theVertexto its adjacent vertices given a direction and edge labels.default GraphTraversal<S,E> When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.default GraphTraversal<S,Edge> Map theVertexto its incident edges given the direction.default GraphTraversal<S,Edge> Map theVertexto its incident edges given the direction and edge labels.default GraphTraversal<S,Edge> Map theVertexto its incident edges given the direction and edge labels.default GraphTraversal<S,String> toLower()Returns the lowercase representation of incoming string traverser.default <E2> GraphTraversal<S,E2> Returns the lowercase representation of incoming string or list of strings.default GraphTraversal<S,String> toUpper()Returns the uppercase representation of incoming string traverser.default <E2> GraphTraversal<S,E2> Returns the uppercase representation of incoming string or list of strings.default GraphTraversal<S,Vertex> Map theEdgeto its incident vertices given the direction.default GraphTraversal<S,Tree> tree()Aggregates the emanating paths into aTreedata structure.default GraphTraversal<S,E> Aggregates the emanating paths into aTreedata structure.default GraphTraversal<S,String> trim()Returns a string with leading and trailing whitespace removed.default <E2> GraphTraversal<S,E2> Returns a string with leading and trailing whitespace removed.default <E2> GraphTraversal<S,E2> unfold()Unrolls aIterator,IterableorMapinto a linear form or simply emits the object if it is not one of those types.default <E2> GraphTraversal<S,E2> Merges the results of an arbitrary number of traversals.default GraphTraversal<S,E> Modifies arepeat(Traversal)to determine when the loop should exit.default GraphTraversal<S,E> Modifies arepeat(Traversal)to determine when the loop should exit.default GraphTraversal<S,Vertex> AVstep is usually used to start a traversal but it may also be used mid-traversal.default GraphTraversal<S,Vertex> AVstep that accepts a child traversal whose results are used as vertex IDs for lookup.default <E2> GraphTraversal<S,E2> value()Map thePropertyto itsProperty.value().default <E2> GraphTraversal<S,Map<Object, E2>> Deprecated.As of release 3.4.0, deprecated in favor ofvalueMap(String...)in conjunction withwith(String, Object)or simple preferelementMap(String...).default <E2> GraphTraversal<S,Map<Object, E2>> default <E2> GraphTraversal<S,E2> Map theElementto the values of the associated properties given the provide property keys.default GraphTraversal<S,E> Filters the current object based on the object itself or the path history.default GraphTraversal<S,E> Filters the current object based on the object itself or the path history.default GraphTraversal<S,E> Filters the current object based on the object itself or the path history.default GraphTraversal<S,E> Provides a configuration to a step in the form of a key which is the same aswith(key, true).default GraphTraversal<S,E> Provides a configuration to a step in the form of a key and value pair.default GraphTraversal<S,E> write()This step is technically a step modulator for the theGraphTraversalSource.io(String)step which instructs the step to perform a write with its given configuration.Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal
close, explain, fill, forEachRemaining, forEachRemaining, next, notifyClose, promise, toBulkSet, toList, toSet, toStream, tryNext
-
Method Details
-
asAdmin
Description copied from interface:TraversalGet access to administrative methods of the traversal via its accompanyingTraversal.Admin. -
map
- Parameters:
function- the lambda expression that does the functional mapping- Returns:
- the traversal with an appended
LambdaMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
map
- Parameters:
mapTraversal- the traversal expression that does the functional mapping- Returns:
- the traversal with an appended
LambdaMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
flatMap
Map aTraverserreferencing an object of typeEto an iterator of objects of typeE2. The resultant iterator is drained one-by-one before a newEobject is pulled in for processing.- Type Parameters:
E2- the type of the returned iterator objects- Parameters:
function- the lambda expression that does the functional mapping- Returns:
- the traversal with an appended
LambdaFlatMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
flatMap
Map aTraverserreferencing an object of typeEto an iterator of objects of typeE2. The internal traversal is drained one-by-one before a newEobject is pulled in for processing.- Type Parameters:
E2- the end type of the internal traversal- Parameters:
flatMapTraversal- the traversal generating objects of typeE2- Returns:
- the traversal with an appended
TraversalFlatMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
id
Map theElementto itsElement.id().- Returns:
- the traversal with an appended
IdStep. - Since:
- 3.0.0-incubating
- See Also:
-
label
Deprecated.As of release 4.0.0, replaced bylabels().Map theElementto itsElement.label().- Returns:
- the traversal with an appended
LabelStep. - Since:
- 3.0.0-incubating
- See Also:
-
labels
Map theElementto its labels, emitting each label as a separate traverser. For vertices with multiple labels, each label is emitted individually.- Returns:
- the traversal with an appended
LabelsStep. - Since:
- 4.0.0
-
identity
Map theEobject to itself. In other words, a "no op."- Returns:
- the traversal with an appended
IdentityStep. - Since:
- 3.0.0-incubating
-
constant
Map any object to a fixedEvalue.- Returns:
- the traversal with an appended
ConstantStep. - Since:
- 3.0.0-incubating
- See Also:
-
constant
Map any object to a fixedEvalue. For internal use for parameterization features.- Returns:
- the traversal with an appended
ConstantStep. - Since:
- 4.0.0
- See Also:
-
V
AVstep is usually used to start a traversal but it may also be used mid-traversal.- Parameters:
vertexIdsOrElements- vertices to inject into the traversal- Returns:
- the traversal with an appended
GraphStep - Since:
- 3.1.0-incubating
- See Also:
-
V
AVstep that accepts a child traversal whose results are used as vertex IDs for lookup.- Parameters:
traversal- the child traversal that produces vertex IDs- Returns:
- the traversal with an appended
GraphStep - Since:
- 4.0.0
- See Also:
-
E
AEstep is usually used to start a traversal but it may also be used mid-traversal.- Parameters:
edgeIdsOrElements- edges to inject into the traversal- Returns:
- the traversal with an appended
GraphStep - Since:
- 3.7.0
- See Also:
-
E
AEstep that accepts a child traversal whose results are used as edge IDs for lookup.- Parameters:
traversal- the child traversal that produces edge IDs- Returns:
- the traversal with an appended
GraphStep - Since:
- 4.0.0
- See Also:
-
to
Map theVertexto its adjacent vertices given a direction.- Parameters:
direction- the direction to traverse from the current vertex- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
to
Map theVertexto its adjacent vertices given a direction and edge labels.- Parameters:
direction- the direction to traverse from the current vertexedgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
to
Map theVertexto its adjacent vertices given a direction and edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
direction- the direction to traverse from the current vertexedgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
out
Map theVertexto its outgoing adjacent vertices.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
out
Map theVertexto its outgoing adjacent vertices given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
out
Map theVertexto its outgoing adjacent vertices given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
in
Map theVertexto its incoming adjacent vertices.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
in
Map theVertexto its incoming adjacent vertices given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
in
Map theVertexto its incoming adjacent vertices given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
both
Map theVertexto its adjacent vertices.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
both
Map theVertexto its adjacent vertices given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
both
Map theVertexto its adjacent vertices given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
toE
Map theVertexto its incident edges given the direction.- Parameters:
direction- the direction to traverse from the current vertex- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
toE
Map theVertexto its incident edges given the direction and edge labels.- Parameters:
direction- the direction to traverse from the current vertexedgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
toE
Map theVertexto its incident edges given the direction and edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
direction- the direction to traverse from the current vertexedgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
outE
Map theVertexto its outgoing incident edges.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
outE
Map theVertexto its outgoing incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
outE
Map theVertexto its outgoing incident edges given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
inE
Map theVertexto its incoming incident edges.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
inE
Map theVertexto its incoming incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
inE
Map theVertexto its incoming incident edges given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
bothE
Map theVertexto its incident edges.- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
bothE
Map theVertexto its incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
bothE
Map theVertexto its incident edges given the edge labels. The arguments for the labels must be either aStringor aGValue<String>. For internal use for parameterization.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- the traversal with an appended
VertexStep. - Since:
- 3.8.0
- See Also:
-
toV
Map theEdgeto its incident vertices given the direction.- Parameters:
direction- the direction to traverser from the current edge- Returns:
- the traversal with an appended
EdgeVertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
inV
- Returns:
- the traversal with an appended
EdgeVertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
outV
- Returns:
- the traversal with an appended
EdgeVertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
bothV
Map theEdgeto its incident vertices.- Returns:
- the traversal with an appended
EdgeVertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
otherV
Map theEdgeto the incident vertex that was not just traversed from in the path history.- Returns:
- the traversal with an appended
EdgeOtherVertexStep. - Since:
- 3.0.0-incubating
- See Also:
-
order
Order all the objects in the traversal up to this point and then emit them one-by-one in their ordered sequence.- Returns:
- the traversal with an appended
OrderGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
order
Order either theScope.localobject (e.g. a list, map, etc.) or the entireScope.globaltraversal stream.- Parameters:
scope- whether the ordering is the current local object or the entire global stream.- Returns:
- the traversal with an appended
OrderGlobalSteporOrderLocalStepdepending on thescope. - Since:
- 3.0.0-incubating
- See Also:
-
properties
Map theElementto its associated properties given the provide property keys. If no property keys are provided, then all properties are emitted.- Type Parameters:
E2- the value type of the returned properties- Parameters:
propertyKeys- the properties to retrieve- Returns:
- the traversal with an appended
PropertiesStep. - Since:
- 3.0.0-incubating
- See Also:
-
values
Map theElementto the values of the associated properties given the provide property keys. If no property keys are provided, then all property values are emitted.- Type Parameters:
E2- the value type of the properties- Parameters:
propertyKeys- the properties to retrieve their value from- Returns:
- the traversal with an appended
PropertiesStep. - Since:
- 3.0.0-incubating
- See Also:
-
propertyMap
Map theElementto aMapof the properties key'd according to theirProperty.key(). If no property keys are provided, then all properties are retrieved.- Type Parameters:
E2- the value type of the returned properties- Parameters:
propertyKeys- the properties to retrieve- Returns:
- the traversal with an appended
PropertyMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
elementMap
Map theElementto aMapof the property values key'd according to theirProperty.key(). If no property keys are provided, then all property values are retrieved. For vertices, theMapwill be returned with the assumption of single property values along withT.idandT.label. PrefervalueMap(String...)if multi-property processing is required. For edges, keys will include additional related edge structure ofDirection.INandDirection.OUTwhich themselves areMapinstances of the particularVertexrepresented byT.idandT.label.- Type Parameters:
E2- the value type of the returned properties- Parameters:
propertyKeys- the properties to retrieve- Returns:
- the traversal with an appended
ElementMapStep. - Since:
- 3.4.4
- See Also:
-
valueMap
Map theElementto aMapof the property values key'd according to theirProperty.key(). If no property keys are provided, then all property values are retrieved.- Type Parameters:
E2- the value type of the returned properties- Parameters:
propertyKeys- the properties to retrieve- Returns:
- the traversal with an appended
PropertyMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
valueMap
@Deprecated default <E2> GraphTraversal<S,Map<Object, valueMapE2>> (boolean includeTokens, String... propertyKeys) Deprecated.As of release 3.4.0, deprecated in favor ofvalueMap(String...)in conjunction withwith(String, Object)or simple preferelementMap(String...).Map theElementto aMapof the property values key'd according to theirProperty.key(). If no property keys are provided, then all property values are retrieved.- Type Parameters:
E2- the value type of the returned properties- Parameters:
includeTokens- whether to includeTtokens in the emitted map.propertyKeys- the properties to retrieve- Returns:
- the traversal with an appended
PropertyMapStep. - Since:
- 3.0.0-incubating
- See Also:
-
key
Map thePropertyto itsProperty.key().- Returns:
- the traversal with an appended
PropertyKeyStep. - Since:
- 3.0.0-incubating
- See Also:
-
value
Map thePropertyto itsProperty.value().- Returns:
- the traversal with an appended
PropertyValueStep. - Since:
- 3.0.0-incubating
- See Also:
-
path
- Returns:
- the traversal with an appended
PathStep. - Since:
- 3.0.0-incubating
- See Also:
-
match
Deprecated.As of release 4.0.0, replaced bymatch(String)for declarative pattern matching.- Type Parameters:
E2- the type of the objects bound in the variables- Parameters:
matchTraversals- the traversal that maintain variables which must hold for the life of the traverser- Returns:
- the traversal with an appended
MatchStep. - Since:
- 3.0.0-incubating
- See Also:
-
match
Map theTraverserto a result using a declarative query string. The query language is not prescribed or implemented by the framework; it defaults tonull, meaning the graph provider will use its native query language. Use.with("queryLanguage", value)to specify a language explicitly. Consult the graph system you are using to determine what query language you can give to this step.- Parameters:
matchQuery- the declarative query string- Returns:
- the traversal with an appended
DeclarativeMatchStep. - Since:
- 4.0.0
-
match
Map theTraverserto a result using a declarative query string with bound parameters. The query language is not prescribed or implemented by the framework; it defaults tonull, meaning the graph provider will use its native query language. Use.with("queryLanguage", value)to specify a language explicitly. Consult the graph system you are using to determine what query language you can give to this step.- Parameters:
matchQuery- the declarative query stringparams- the query parameters (may benull)- Returns:
- the traversal with an appended
DeclarativeMatchStep. - Since:
- 4.0.0
-
sack
Map theTraverserto itsTraverser.sack()value.- Type Parameters:
E2- the sack value type- Returns:
- the traversal with an appended
SackStep. - Since:
- 3.0.0-incubating
- See Also:
-
loops
If theTraversersupports looping then calling this method will extract the number of loops for that traverser.- Returns:
- the traversal with an appended
LoopsStep - Since:
- 3.1.0-incubating
- See Also:
-
loops
If theTraversersupports looping then calling this method will extract the number of loops for that traverser for the named loop.- Returns:
- the traversal with an appended
LoopsStep - Since:
- 3.4.0
- See Also:
-
project
default <E2> GraphTraversal<S,Map<String, projectE2>> (String projectKey, String... otherProjectKeys) Projects the current object in the stream into aMapthat is keyed by the provided labels.- Returns:
- the traversal with an appended
ProjectStep - Since:
- 3.2.0-incubating
- See Also:
-
select
default <E2> GraphTraversal<S,Map<String, selectE2>> (Pop pop, String selectKey1, String selectKey2, String... otherSelectKeys) - Type Parameters:
E2- the type of the objects projected- Parameters:
pop- if there are multiple objects referenced in the path, thePopto use.selectKey1- the first key to projectselectKey2- the second key to projectotherSelectKeys- the third+ keys to project- Returns:
- the traversal with an appended
SelectStep. - Since:
- 3.0.0-incubating
- See Also:
-
select
default <E2> GraphTraversal<S,Map<String, selectE2>> (String selectKey1, String selectKey2, String... otherSelectKeys) - Type Parameters:
E2- the type of the objects projected- Parameters:
selectKey1- the first key to projectselectKey2- the second key to projectotherSelectKeys- the third+ keys to project- Returns:
- the traversal with an appended
SelectStep. - Since:
- 3.0.0-incubating
- See Also:
-
select
- Parameters:
selectKey- the key to project- Returns:
- the traversal with an appended
SelectStep. - Since:
- 3.0.0-incubating
- See Also:
-
select
Map theTraverserto the object specified by theselectKey. Note that unlike other uses ofselectwhere there are multiple keys, this use ofselectwith a single key does not produce aMap.- Parameters:
selectKey- the key to project- Returns:
- the traversal with an appended
SelectStep. - Since:
- 3.0.0-incubating
- See Also:
-
select
Map theTraverserto the object specified by the key returned by thekeyTraversaland apply thePopoperation to it.- Parameters:
keyTraversal- the traversal expression that selects the key to project- Returns:
- the traversal with an appended
SelectStep. - Since:
- 3.3.3
- See Also:
-
select
Map theTraverserto the object specified by the key returned by thekeyTraversal. Note that unlike other uses ofselectwhere there are multiple keys, this use ofselectwith a traversal does not produce aMap.- Parameters:
keyTraversal- the traversal expression that selects the key to project- Returns:
- the traversal with an appended
TraversalSelectStep. - Since:
- 3.3.3
- See Also:
-
select
A version ofselectthat allows for the extraction of aColumnfrom objects in the traversal.- Parameters:
column- the column to extract- Returns:
- the traversal with an appended
TraversalMapStep - Since:
- 3.1.0-incubating
- See Also:
-
unfold
Unrolls aIterator,IterableorMapinto a linear form or simply emits the object if it is not one of those types.- Returns:
- the traversal with an appended
UnfoldStep - Since:
- 3.0.0-incubating
- See Also:
-
fold
Rolls up objects in the stream into an aggregate list.- Returns:
- the traversal with an appended
FoldStep - Since:
- 3.0.0-incubating
- See Also:
-
fold
Rolls up objects in the stream into an aggregate value as defined by aseedandBiFunction.- Parameters:
seed- the value to provide as the first argument to thefoldFunctionfoldFunction- the function to fold by where the first argument is theseedor the value returned from subsequent class and the second argument is the value from the stream- Returns:
- the traversal with an appended
FoldStep - Since:
- 3.0.0-incubating
- See Also:
-
count
Map the traversal stream to its reduction as a sum of theTraverser.bulk()values (i.e. count the number of traversers up to this point).- Returns:
- the traversal with an appended
CountGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
count
Map the traversal stream to its reduction as a sum of theTraverser.bulk()values given the specifiedScope(i.e. count the number of traversers up to this point).- Returns:
- the traversal with an appended
CountGlobalSteporCountLocalStepdepending on theScope - Since:
- 3.0.0-incubating
- See Also:
-
sum
Map the traversal stream to its reduction as a sum of theTraverser.get()values multiplied by theirTraverser.bulk()(i.e. sum the traverser values up to this point).- Returns:
- the traversal with an appended
SumGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
sum
Map the traversal stream to its reduction as a sum of theTraverser.get()values multiplied by theirTraverser.bulk()given the specifiedScope(i.e. sum the traverser values up to this point).- Returns:
- the traversal with an appended
SumGlobalSteporSumLocalStepdepending on theScope. - Since:
- 3.0.0-incubating
- See Also:
-
max
Determines the largest value in the stream.- Returns:
- the traversal with an appended
MaxGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
max
Determines the largest value in the stream given theScope.- Returns:
- the traversal with an appended
MaxGlobalSteporMaxLocalStepdepending on theScope - Since:
- 3.0.0-incubating
- See Also:
-
min
Determines the smallest value in the stream.- Returns:
- the traversal with an appended
MinGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
min
Determines the smallest value in the stream given theScope.- Returns:
- the traversal with an appended
MinGlobalSteporMinLocalStepdepending on theScope - Since:
- 3.0.0-incubating
- See Also:
-
mean
Determines the mean value in the stream.- Returns:
- the traversal with an appended
MeanGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
mean
Determines the mean value in the stream given theScope.- Returns:
- the traversal with an appended
MeanGlobalSteporMeanLocalStepdepending on theScope - Since:
- 3.0.0-incubating
- See Also:
-
group
Organize objects in the stream into aMap. Calls togroup()are typically accompanied withby()modulators which help specify how the grouping should occur.- Returns:
- the traversal with an appended
GroupStep. - Since:
- 3.1.0-incubating
- See Also:
-
groupCount
Counts the number of times a particular objects has been part of a traversal, returning aMapwhere the object is the key and the value is the count.- Returns:
- the traversal with an appended
GroupCountStep. - Since:
- 3.0.0-incubating
- See Also:
-
tree
Aggregates the emanating paths into aTreedata structure.- Returns:
- the traversal with an appended
TreeStep - Since:
- 3.0.0-incubating
- See Also:
-
addV
Adds aVertex.- Parameters:
label- the first (or only) label of theVertexto addadditionalLabels- additional labels (may be empty for single-label)- Returns:
- the traversal with the
AddVertexStepContractadded - Since:
- 3.1.0-incubating
- See Also:
-
addV
- Parameters:
first- the first (or only) label traversalmore- additional label traversals (may be empty for single-traversal behavior)- Returns:
- the traversal with the
AddVertexStepContractadded - Since:
- 3.3.1
- See Also:
-
addV
Adds aVertexwith a default vertex label.- Returns:
- the traversal with the
AddVertexStepContractadded - Since:
- 3.8.0
- See Also:
-
addV
Adds aVertex.- Parameters:
label- the label (or only) labeladditionalLabels- additional labels. May be empty for single-label)- Returns:
- the traversal with the
AddVertexStepContractadded - Since:
- 3.8.0
-
mergeV
Performs a merge (i.e. upsert) style operation for anVertexusing the incomingMaptraverser as an argument. TheMaprepresents search criteria and will match each of the supplied key/value pairs where the keys may beStringproperty values or a value ofT. If a match is not made it will use that search criteria to create the newVertex.- Since:
- 3.6.0
-
mergeV
Performs a merge (i.e. upsert) style operation for anVertexusing aMapas an argument. TheMaprepresents search criteria and will match each of the supplied key/value pairs where the keys may beStringproperty values or a value ofT. If a match is not made it will use that search criteria to create the newVertex.- Parameters:
searchCreate- ThisMapcan have a key ofTor aString.- Since:
- 3.6.0
-
mergeV
Performs a merge (i.e. upsert) style operation for anVertexusing aMapas an argument. TheMaprepresents search criteria and will match each of the supplied key/value pairs where the keys may beStringproperty values or a value ofT. If a match is not made it will use that search criteria to create the newVertex. -
mergeV
Performs a merge (i.e. upsert) style operation for anVertexusing aMapas an argument. TheMaprepresents search criteria and will match each of the supplied key/value pairs where the keys may beStringproperty values or a value ofT. If a match is not made it will use that search criteria to create the newVertex.- Parameters:
searchCreate- ThisMapcan have a key ofTor aString.- Since:
- 3.8.0
-
mergeE
Spawns aGraphTraversalby doing a merge (i.e. upsert) style operation for anEdgeusing an incomingMapas an argument.- Since:
- 3.6.0
-
mergeE
Spawns aGraphTraversalby doing a merge (i.e. upsert) style operation for anEdgeusing aMapas an argument. -
mergeE
Spawns aGraphTraversalby doing a merge (i.e. upsert) style operation for anEdgeusing aMapas an argument. -
mergeE
Spawns aGraphTraversalby doing a merge (i.e. upsert) style operation for anEdgeusing aMapas an argument. -
addE
Adds anEdgewith the specified edge label.- Parameters:
edgeLabel- the label of the newly added edge- Returns:
- the traversal with the
AddEdgeStepContractadded - Since:
- 3.1.0-incubating
- See Also:
-
addE
- Returns:
- the traversal with the
AddEdgeStepContractadded - Since:
- 3.3.1
- See Also:
-
addE
Adds anEdgewith the specified edge label.- Parameters:
edgeLabel- the label of the newly added edge- Returns:
- the traversal with the
AddEdgeStepContractadded - Since:
- 3.8.0
- See Also:
-
from
Providefrom()-modulation to respective steps.- Parameters:
fromStepLabel- the step label to modulate to.- Returns:
- the traversal with the modified
FromToModulatingstep. - Since:
- 3.1.0-incubating
- See Also:
-
from
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.- Parameters:
fromVertex- the vertex for selecting the outgoing vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.8.0
- See Also:
-
from
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.- Parameters:
fromVertex- the vertex for selecting the outgoing vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.3.0
- See Also:
-
to
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.- Parameters:
toVertex- the vertex for selecting the incoming vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.8.0
- See Also:
-
to
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.- Parameters:
toVertex- the traversal for selecting the incoming vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.1.0-incubating
- See Also:
-
from
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the outgoing vertex of the newly addedEdge.- Parameters:
fromVertex- the traversal for selecting the outgoing vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.1.0-incubating
- See Also:
-
to
When used as a modifier toaddE(String)this method specifies the traversal to use for selecting the incoming vertex of the newly addedEdge.- Parameters:
toVertex- the vertex for selecting the incoming vertex- Returns:
- the traversal with the modified
AddEdgeStepContract - Since:
- 3.8.0
- See Also:
-
to
Provideto()-modulation to respective steps.- Parameters:
toStepLabel- the step label to modulate to.- Returns:
- the traversal with the modified
FromToModulatingstep. - Since:
- 3.1.0-incubating
- See Also:
-
math
- Parameters:
expression- the mathematical expression with variables refering to scope variables.- Returns:
- the traversal with the
MathStepadded. - Since:
- 3.3.1
-
element
- Returns:
- the traversal with an appended
ElementStep. - Since:
- 3.6.0
- See Also:
-
call
Perform the specified service call with no parameters.- Parameters:
service- the name of the service call- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.6.0
- See Also:
-
call
Perform the specified service call with the specified static parameters.- Parameters:
service- the name of the service callparams- static parameter map (no nested traversals)- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.6.0
- See Also:
-
call
Perform the specified service call with the specified static parameters.- Parameters:
service- the name of the service callparams- static parameter map (no nested traversals)- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.8.0
- See Also:
-
call
Perform the specified service call with dynamic parameters produced by the specified child traversal.- Parameters:
service- the name of the service callchildTraversal- a traversal that will produce a Map of parameters for the service call when invoked.- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.6.0
- See Also:
-
call
default <E> GraphTraversal<S,E> call(String service, Map params, Traversal<?, Map<?, ?>> childTraversal) Perform the specified service call with both static and dynamic parameters produced by the specified child traversal. These parameters will be merged at execution time per the provider implementation. Reference implementation merges dynamic into static (dynamic will overwrite static).- Parameters:
service- the name of the service callparams- static parameter map (no nested traversals)childTraversal- a traversal that will produce a Map of parameters for the service call when invoked.- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.6.0
- See Also:
-
call
default <E> GraphTraversal<S,E> call(String service, GValue<Map<?, ?>> params, Traversal<S, Map<?, ?>> childTraversal) Perform the specified service call with both static and dynamic parameters produced by the specified child traversal. These parameters will be merged at execution time per the provider implementation. Reference implementation merges dynamic into static (dynamic will overwrite static).- Parameters:
service- the name of the service callparams- static parameter map (no nested traversals)childTraversal- a traversal that will produce a Map of parameters for the service call when invoked.- Returns:
- the traversal with an appended
CallStep. - Since:
- 3.8.0
- See Also:
-
concat
default GraphTraversal<S,String> concat(Traversal<?, String> concatTraversal, Traversal<?, String>... otherConcatTraversals) Concatenate values of an arbitrary number of string traversals to the incoming traverser.- Parameters:
concatTraversal- the traversal to concatenate.otherConcatTraversals- additional traversals to concatenate.- Returns:
- the traversal with an appended
ConcatStep. - Since:
- 3.7.1
- See Also:
-
concat
Concatenate an arbitrary number of strings to the incoming traverser.- Parameters:
concatStrings- the String values to concatenate.- Returns:
- the traversal with an appended
ConcatStep. - Since:
- 3.7.0
- See Also:
-
asString
Returns the value of incoming traverser as strings. Null values are returned as a string value "null".- Returns:
- the traversal with an appended
AsStringGlobalStep. - Since:
- 3.7.1
- See Also:
-
asString
Returns the value of incoming traverser as strings. Null values are returned as a string value "null".- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.- Returns:
- the traversal with an appended
AsStringGlobalSteporAsStringLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
length
Returns the length incoming string traverser. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
LengthGlobalStep. - Since:
- 3.7.1
- See Also:
-
length
Returns the length incoming string or list. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within lists, global will operate on current traversal as a single object.- Returns:
- the traversal with an appended
LengthGlobalSteporLengthLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
toLower
Returns the lowercase representation of incoming string traverser. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
ToLowerGlobalStep. - Since:
- 3.7.1
- See Also:
-
toLower
Returns the lowercase representation of incoming string or list of strings. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will accept lists of string and operate on individual strings within the list, global will only accept string objects.- Returns:
- the traversal with an appended
ToLowerGlobalSteporToLowerLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
toUpper
Returns the uppercase representation of incoming string traverser. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
ToUpperGlobalStep. - Since:
- 3.7.1
- See Also:
-
toUpper
Returns the uppercase representation of incoming string or list of strings. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will accept lists of string and operate on individual strings within the list, global will only accept string objects.- Returns:
- the traversal with an appended
ToUpperGlobalSteporToUpperLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
trim
Returns a string with leading and trailing whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
TrimGlobalStep. - Since:
- 3.7.1
- See Also:
-
trim
Returns a string with leading and trailing whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.- Returns:
- the traversal with an appended
TrimGlobalSteporTrimLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
lTrim
Returns a string with leading whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
LTrimGlobalStep. - Since:
- 3.7.1
- See Also:
-
lTrim
Returns a string with leading whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.- Returns:
- the traversal with an appended
LTrimGlobalSteporLTrimLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
rTrim
Returns a string with trailing whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Returns:
- the traversal with an appended
RTrimGlobalStep. - Since:
- 3.7.1
- See Also:
-
rTrim
Returns a string with trailing whitespace removed. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.- Returns:
- the traversal with an appended
RTrimGlobalSteporRTrimLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
reverse
Returns the reverse of the incoming traverser. Null values are not processed and remain as null when returned.- Returns:
- the traversal with an appended
ReverseStep. - Since:
- 3.7.1
- See Also:
-
replace
Returns a string with the specified characters in the original string replaced with the new characters. Any null arguments will be a no-op and the original string is returned. Null values from incoming traversers are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
newChar- the character to replace.oldChar- the character to be replaced.- Returns:
- the traversal with an appended
ReplaceGlobalStep. - Since:
- 3.7.1
- See Also:
-
replace
Returns a string with the specified characters in the original string replaced with the new characters. Any null arguments will be a no-op and the original string is returned. Null values from incoming traversers are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.newChar- the character to replace.oldChar- the character to be replaced.- Returns:
- the traversal with an appended
ReplaceGlobalSteporReplaceLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
split
Returns a list of strings created by splitting the incoming string traverser around the matches of the given separator. A null separator will split the string by whitespaces. Null values from incoming traversers are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
separator- the character to split the string on.- Returns:
- the traversal with an appended
SplitGlobalStep. - Since:
- 3.7.1
- See Also:
-
split
Returns a list of strings created by splitting the incoming string traverser around the matches of the given separator. A null separator will split the string by whitespaces. Null values from incoming traversers are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.separator- the character to split the string on.- Returns:
- the traversal with an appended
SplitGlobalSteporSplitLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
substring
Returns a substring of the incoming string traverser with a 0-based start index (inclusive) specified, to the end of the string. If the start index is negative then it will begin at the specified index counted from the end of the string, or 0 if exceeding the string length. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
startIndex- the start index of the substring, inclusive.- Returns:
- the traversal with an appended
SubstringGlobalStep. - Since:
- 3.7.1
- See Also:
-
substring
Returns a substring of the incoming string traverser with a 0-based start index (inclusive) specified, to the end of the string. If the start index is negative then it will begin at the specified index counted from the end of the string, or 0 if exceeding the string length. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.startIndex- the start index of the substring, inclusive.- Returns:
- the traversal with an appended
SubstringGlobalSteporSubstringLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
substring
Returns a substring of the incoming string traverser with a 0-based start index (inclusive) and end index (exclusive). If the start index is negative then it will begin at the specified index counted from the end of the string, or 0 if exceeding the string length. If the end index is negative then it will end at the specified index counted from the end, or at the end of the string if exceeding the string length. End index <= start index will return the empty string. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
startIndex- the start index of the substring, inclusive.endIndex- the end index of the substring, exclusive.- Returns:
- the traversal with an appended
SubstringGlobalStep. - Since:
- 3.7.1
- See Also:
-
substring
Returns a substring of the incoming string traverser with a 0-based start index (inclusive) and end index (exclusive). If the start index is negative then it will begin at the specified index counted from the end of the string, or 0 if exceeding the string length. If the end index is negative then it will end at the specified index counted from the end, or at the end of the string if exceeding the string length. End index <= start index will return the empty string. Null values are not processed and remain as null when returned. If the incoming traverser is a non-String value then anIllegalArgumentExceptionwill be thrown.- Parameters:
scope- local will operate on individual strings within incoming lists, global will operate on current traversal as a single object.startIndex- the start index of the substring, inclusive.endIndex- the end index of the substring, exclusive.- Returns:
- the traversal with an appended
SubstringGlobalSteporSubstringLocalStepdepending on theScope. - Since:
- 3.7.1
- See Also:
-
format
A mid-traversal step which will handle result formatting to string values.- Returns:
- the traversal with an appended
FormatStep. - Since:
- 3.7.1
- See Also:
-
asBool
Parse the incoming traverser as a boolean value.- Returns:
- the traversal with an appended
AsBoolStep. - Since:
- 3.8.0
- See Also:
-
asDate
Parse value of the incoming traverser as an ISO-8601OffsetDateTime.- Returns:
- the traversal with an appended
AsDateStep. - Since:
- 3.7.1
- See Also:
-
asNumber
Parse value of the incoming traverser as aNumber.- Returns:
- the traversal with an appended
AsNumberStep. - Since:
- 3.8.0
- See Also:
-
asNumber
Parse value of the incoming traverser as aNumber.- Returns:
- the traversal with an appended
AsNumberStep. - Since:
- 3.8.0
- See Also:
-
dateAdd
Increase value of inputOffsetDateTime.- Returns:
- the traversal with an appended
DateAddStep. - Since:
- 3.7.1
- See Also:
-
dateDiff
Deprecated.As of release 3.8.0, deprecated in favor ofdateDiff(OffsetDateTime).Returns the difference between twoOffsetDateTimein epoch time.- Returns:
- the traversal with an appended
DateDiffStep. - Since:
- 3.7.1
- See Also:
-
dateDiff
Returns the difference between twoOffsetDateTimein epoch time.- Returns:
- the traversal with an appended
DateDiffStep. - Since:
- 3.7.1
- See Also:
-
dateDiff
Returns the difference between two dates in epoch time.- Parameters:
dateTraversal- a traversal that supplies aOffsetDateTimeobject (Dateis also accepted for compatibility).- Returns:
- the traversal with an appended
DateDiffStep. - Since:
- 3.7.1
- See Also:
-
difference
Calculates the difference between the list traverser and list argument.- Returns:
- the traversal with an appended
DifferenceStep. - Since:
- 3.7.1
- See Also:
-
disjunct
Calculates the disjunction between the list traverser and list argument.- Returns:
- the traversal with an appended
DisjunctStep. - Since:
- 3.7.1
- See Also:
-
intersect
Calculates the intersection between the list traverser and list argument.- Returns:
- the traversal with an appended
IntersectStep. - Since:
- 3.7.1
- See Also:
-
conjoin
Joins together the elements of the incoming list traverser together with the provided delimiter.- Returns:
- the traversal with an appended
ConjoinStep. - Since:
- 3.7.1
- See Also:
-
merge
Merges the list traverser and list argument. Also known as union.- Returns:
- the traversal with an appended
MergeStep. - Since:
- 3.7.1
- See Also:
-
combine
Combines the list traverser and list argument. Also known as concatenation or append.- Returns:
- the traversal with an appended
CombineStep. - Since:
- 3.7.1
- See Also:
-
product
Calculates the cartesian product between the list traverser and list argument.- Returns:
- the traversal with an appended
ProductStep. - Since:
- 3.7.1
- See Also:
-
filter
Map theTraverserto eithertrueorfalse, wherefalsewill not pass the traverser to the next step.- Parameters:
predicate- the filter function to apply- Returns:
- the traversal with the
LambdaFilterStepadded - Since:
- 3.0.0-incubating
- See Also:
-
filter
Map theTraverserto eithertrueorfalse, wherefalsewill not pass the traverser to the next step.- Parameters:
filterTraversal- the filter traversal to apply- Returns:
- the traversal with the
TraversalFilterStepadded - Since:
- 3.0.0-incubating
- See Also:
-
discard
Filter all traversers in the traversal. Formerly namednone()prior to 3.8.0. -
or
Ensures that at least one of the provided traversals yield a result.- Parameters:
orTraversals- filter traversals where at least one must be satisfied- Returns:
- the traversal with an appended
OrStep - Since:
- 3.0.0-incubating
- See Also:
-
and
Ensures that all of the provided traversals yield a result.- Parameters:
andTraversals- filter traversals that must be satisfied- Returns:
- the traversal with an appended
AndStep - Since:
- 3.0.0-incubating
- See Also:
-
inject
Provides a way to add arbitrary objects to a traversal stream.- Parameters:
injections- the objects to add to the stream- Returns:
- the traversal with an appended
InjectStep - Since:
- 3.0.0-incubating
- See Also:
-
dedup
Remove all duplicates in the traversal stream up to this point.- Parameters:
scope- whether the deduplication is on the stream (global) or the current object (local).dedupLabels- if labels are provided, then the scope labels determine de-duplication. No labels implies current object.- Returns:
- the traversal with an appended
DedupGlobalSteporDedupLocalStepdepending onscope - Since:
- 3.0.0-incubating
- See Also:
-
dedup
Remove all duplicates in the traversal stream up to this point.- Parameters:
dedupLabels- if labels are provided, then the scoped object's labels determine de-duplication. No labels implies current object.- Returns:
- the traversal with an appended
DedupGlobalStep. - Since:
- 3.0.0-incubating
- See Also:
-
where
Filters the current object based on the object itself or the path history.- Parameters:
startKey- the key containing the object to filterpredicate- the filter to apply- Returns:
- the traversal with an appended
WherePredicateStep - Since:
- 3.0.0-incubating
- See Also:
-
where
Filters the current object based on the object itself or the path history.- Parameters:
predicate- the filter to apply- Returns:
- the traversal with an appended
WherePredicateStep - Since:
- 3.0.0-incubating
- See Also:
-
where
Filters the current object based on the object itself or the path history.- Parameters:
whereTraversal- the filter to apply- Returns:
- the traversal with an appended
WherePredicateStep - Since:
- 3.0.0-incubating
- See Also:
-
has
Filters vertices, edges and vertex properties based on their properties.- Parameters:
propertyKey- the key of the property to filter onpredicate- the filter to apply to the key's value- Returns:
- the traversal with an appended
HasStep - Since:
- 3.0.0-incubating
- See Also:
-
has
Filters vertices, edges and vertex properties based on their properties. -
has
Filters vertices, edges and vertex properties based on their properties.- Parameters:
propertyKey- the key of the property to filter onvalue- the value to compare the property value to for equality- Returns:
- the traversal with an appended
HasStep - Since:
- 3.0.0-incubating
- See Also:
-
has
Filters vertices, edges and vertex properties based on their properties. -
has
Filters vertices, edges and vertex properties based on their properties using a child traversal whose results are resolved at runtime against the current traverser. The resolved results are used withP.within()semantics for comparison against the named property.- Parameters:
propertyKey- the key of the property to filter ontraversal- the child traversal whose results are used as the filter value- Returns:
- the traversal with an appended
HasStep - Since:
- 4.0.0
- See Also:
-
has
Filters vertices, edges and vertex properties based on their properties using a child traversal whose results are resolved at runtime against the current traverser. The resolved results are used withP.within()semantics for comparison against the T-accessor value (id or label). -
has
Filters vertices, edges and vertex properties based on their properties. -
has
Filters vertices, edges and vertex properties based on their properties. -
has
Filters vertices, edges and vertex properties based on their label and a property value resolved from a child traversal at runtime. The label is matched first, then the child traversal results are used withP.within()semantics for comparison against the named property. -
has
Filters vertices, edges and vertex properties based on the existence of properties.- Parameters:
propertyKey- the key of the property to filter on for existence- Returns:
- the traversal with an appended
HasStep - Since:
- 3.0.0-incubating
- See Also:
-
has
Filters vertices, edges and vertex properties based on their properties. -
has
Filters vertices, edges and vertex properties based on their properties. -
hasNot
Filters vertices, edges and vertex properties based on the non-existence of properties.- Parameters:
propertyKey- the key of the property to filter on for existence- Returns:
- the traversal with an appended
HasStep - Since:
- 3.0.0-incubating
- See Also:
-
hasLabel
Filters vertices, edges and vertex properties based on their label. -
hasLabel
Filters vertices, edges and vertex properties based on their label. Note that calling this step withnullis the same as callinghasLabel(String, String...)with a singlenull. -
hasLabel
Filters vertices, edges and vertex properties based on their label using a child traversal whose results are resolved at runtime against the current traverser.- Parameters:
traversal- the child traversal whose results are used as the label filter value- Returns:
- the traversal with an appended
HasStep - Since:
- 4.0.0
- See Also:
-
hasLabel
Filters vertices, edges and vertex properties based on their label. -
hasId
Filters vertices, edges and vertex properties based on their identifier. -
hasId
Filters vertices, edges and vertex properties based on their identifier. Calling this step with anullvalue will result in effectively callinghasId(Object, Object...)wit a singlenullidentifier and therefore filter all results since aT.idcannot benull. -
hasKey
FiltersPropertyobjects based on their key. It is not meant to test key existence on anEdgeor aVertex. In that case, preferhas(String). -
hasKey
FiltersPropertyobjects based on their key. It is not meant to test key existence on anEdgeor aVertex. In that case, preferhas(String). Note that calling this step withnullis the same as callinghasKey(String, String...)with a singlenull. -
hasKey
FiltersPropertyobjects based on their key using a child traversal whose results are resolved at runtime against the current traverser.- Parameters:
traversal- the child traversal whose results are used as the key filter value- Returns:
- the traversal with an appended
HasStep - Since:
- 4.0.0
- See Also:
-
hasValue
FiltersPropertyobjects based on their value. -
hasValue
FiltersPropertyobjects based on their value.Note that calling this step withnullis the same as callinghasValue(Object, Object...)with a singlenull. -
hasValue
FiltersPropertyobjects based on their value using a child traversal whose results are resolved at runtime against the current traverser.- Parameters:
traversal- the child traversal whose results are used as the value filter- Returns:
- the traversal with an appended
HasStep - Since:
- 4.0.0
- See Also:
-
is
FiltersEobject values given the providedpredicate.- Parameters:
predicate- the filter to apply- Returns:
- the traversal with an appended
IsStep - Since:
- 3.0.0-incubating
- See Also:
-
is
Filter theEobject if it is notP.eq(V)to the provided value.- Parameters:
value- the value that the object must equal.- Returns:
- the traversal with an appended
IsStep. - Since:
- 3.0.0-incubating
- See Also:
-
not
Removes objects from the traversal stream when the traversal provided as an argument returns any objects.- Parameters:
notTraversal- the traversal to filter by.- Returns:
- the traversal with an appended
NotStep. - Since:
- 3.0.0-incubating
- See Also:
-
coin
Filter theEobject given a biased coin toss.- Parameters:
probability- the probability that the object will pass through- Returns:
- the traversal with an appended
CoinStep. - Since:
- 3.0.0-incubating
- See Also:
-
coin
Filter theEobject given a biased coin toss. For internal use for parameterization features.- Parameters:
probability- the probability that the object will pass through the filter- Returns:
- the traversal with an appended
CoinStep. - Since:
- 4.0.0
- See Also:
-
range
Filter the objects in the traversal by the number of them to pass through the stream. Those before the value oflowdo not pass through and those that exceed the value ofhighwill end the iteration.- Parameters:
low- the number at which to start allowing objects through the streamhigh- the number at which to end the stream - use-1to emit all remaining objects- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.0.0-incubating
- See Also:
-
range
Filter the objects in the traversal by the number of them to pass through the stream. Those before the value oflowdo not pass through and those that exceed the value ofhighwill end the iteration.- Parameters:
low- the number at which to start allowing objects through the streamhigh- the number at which to end the stream - use-1to emit all remaining objects- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.8.0
- See Also:
-
range
Filter the objects in the traversal by the number of them to pass through the stream as constrained by theScope. Those before the value oflowdo not pass through and those that exceed the value ofhighwill end the iteration.- Parameters:
scope- the scope of how to apply therangelow- the number at which to start allowing objects through the streamhigh- the number at which to end the stream - use-1to emit all remaining objects- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.0.0-incubating
- See Also:
-
range
Filter the objects in the traversal by the number of them to pass through the stream as constrained by theScope. Those before the value oflowdo not pass through and those that exceed the value ofhighwill end the iteration.- Parameters:
scope- the scope of how to apply therangelow- the number at which to start allowing objects through the streamhigh- the number at which to end the stream - use-1to emit all remaining objects- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.8.0
- See Also:
-
limit
Filter the objects in the traversal by the number of them to pass through the stream, where only the firstnobjects are allowed as defined by thelimitargument.- Parameters:
limit- the number at which to end the stream- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.0.0-incubating
- See Also:
-
limit
Filter the objects in the traversal by the number of them to pass through the stream, where only the firstnobjects are allowed as defined by thelimitargument.- Parameters:
limit- the number at which to end the stream- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.8.0
- See Also:
-
limit
Filter the objects in the traversal by the number of them to pass through the stream given theScope, where only the firstnobjects are allowed as defined by thelimitargument.- Parameters:
scope- the scope of how to apply thelimitlimit- the number at which to end the stream- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.0.0-incubating
- See Also:
-
limit
Filter the objects in the traversal by the number of them to pass through the stream given theScope, where only the firstnobjects are allowed as defined by thelimitargument.- Parameters:
scope- the scope of how to apply thelimitlimit- the number at which to end the stream- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.8.0
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream. In this case, only the last object will be returned.- Returns:
- the traversal with an appended
TailGlobalStep - Since:
- 3.0.0-incubating
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream. In this case, only the lastnobjects will be returned as defined by thelimit.- Parameters:
limit- the number at which to end the stream- Returns:
- the traversal with an appended
TailGlobalStep - Since:
- 3.0.0-incubating
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream. In this case, only the lastnobjects will be returned as defined by thelimit.- Parameters:
limit- the number at which to end the stream- Returns:
- the traversal with an appended
TailGlobalStep - Since:
- 3.8.0
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream given theScope. In this case, only the last object in the stream will be returned.- Parameters:
scope- the scope of how to apply thetail- Returns:
- the traversal with an appended
TailGlobalSteporTailLocalStepdepending onscope - Since:
- 3.0.0-incubating
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream given theScope. In this case, only the lastnobjects will be returned as defined by thelimit.- Parameters:
scope- the scope of how to apply thetaillimit- the number at which to end the stream- Returns:
- the traversal with an appended
TailGlobalSteporTailLocalStepdepending onscope - Since:
- 3.0.0-incubating
- See Also:
-
tail
Filters the objects in the traversal emitted as being last objects in the stream given theScope. In this case, only the lastnobjects will be returned as defined by thelimit.- Parameters:
scope- the scope of how to apply thetaillimit- the number at which to end the stream- Returns:
- the traversal with an appended
TailGlobalSteporTailLocalStepdepending onscope - Since:
- 3.8.0
- See Also:
-
skip
Filters out the firstnobjects in the traversal.- Parameters:
skip- the number of objects to skip- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.3.0
- See Also:
-
skip
Filters out the firstnobjects in the traversal.- Parameters:
skip- the number of objects to skip- Returns:
- the traversal with an appended
RangeGlobalStep - Since:
- 3.8.0
- See Also:
-
skip
Filters out the firstnobjects in the traversal.- Parameters:
scope- the scope of how to apply thetailskip- the number of objects to skip- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.3.0
- See Also:
-
skip
Filters out the firstnobjects in the traversal.- Parameters:
scope- the scope of how to apply thetailskip- the number of objects to skip- Returns:
- the traversal with an appended
RangeGlobalSteporRangeLocalStepdepending onscope - Since:
- 3.8.0
- See Also:
-
timeLimit
Once the firstTraverserhits this step, a count down is started. Once the time limit is up, all remaining traversers are filtered out.- Parameters:
timeLimit- the count down time- Returns:
- the traversal with an appended
TimeLimitStep - Since:
- 3.0.0-incubating
- See Also:
-
simplePath
- Returns:
- the traversal with an appended
PathFilterStep. - Since:
- 3.0.0-incubating
- See Also:
-
cyclicPath
- Returns:
- the traversal with an appended
PathFilterStep. - Since:
- 3.0.0-incubating
- See Also:
-
sample
Allow some specified number of objects to pass through the stream.- Parameters:
amountToSample- the number of objects to allow- Returns:
- the traversal with an appended
SampleGlobalStep - Since:
- 3.0.0-incubating
- See Also:
-
sample
Allow some specified number of objects to pass through the stream.- Parameters:
scope- the scope of how to apply thesampleamountToSample- the number of objects to allow- Returns:
- the traversal with an appended
SampleGlobalSteporSampleLocalStepdepending on thescope - Since:
- 3.0.0-incubating
- See Also:
-
drop
Removes elements and properties from the graph. This step is not a terminating, in the sense that it does not automatically iterate the traversal. It is therefore necessary to do some form of iteration for the removal to actually take place. In most cases, iteration is best accomplished withg.V().drop().iterate().- Returns:
- the traversal with the
DropStepadded - Since:
- 3.0.0-incubating
- See Also:
-
addLabel
Adds labels to the current element. This is a side-effect step that passes the element through unchanged.- Parameters:
label- the first label to addmoreLabels- additional labels to add- Returns:
- the traversal with an appended
AddLabelStep - Since:
- 4.0.0
-
addLabel
default GraphTraversal<S,E> addLabel(Traversal<?, ?> labelTraversal, Traversal<?, ?>... moreLabelTraversals) Adds labels to the current element. This is a side-effect step that passes the element through unchanged.- Parameters:
labelTraversal- the first (or only) label traversalmoreLabelTraversals- additional label traversals (may be empty for single-traversal behavior)- Returns:
- the traversal with an appended
AddLabelStep - Since:
- 4.0.0
-
dropLabels
Removes all labels from the current element, triggering the provider's default label behavior. This is a side-effect step that passes the element through unchanged.- Returns:
- the traversal with an appended
DropLabelsStep - Since:
- 4.0.0
-
dropLabel
Removes labels from the current element. This is a side-effect step that passes the element through unchanged.- Parameters:
label- the first label to removemoreLabels- additional labels to remove- Returns:
- the traversal with an appended
DropLabelsStep - Since:
- 4.0.0
-
dropLabel
default GraphTraversal<S,E> dropLabel(Traversal<?, String> labelTraversal, Traversal<?, String>... moreLabelTraversals) Removes labels from the current element. This is a side-effect step that passes the element through unchanged.- Parameters:
labelTraversal- the first (or only) label traversalmoreLabelTraversals- additional label traversals (may be empty for single-traversal behavior)- Returns:
- the traversal with an appended
DropLabelsStep - Since:
- 4.0.0
-
all
FiltersElists given the providedpredicate.- Parameters:
predicate- the filter to apply- Returns:
- the traversal with an appended
AllStep - Since:
- 3.7.1
- See Also:
-
any
FiltersElists given the providedpredicate.- Parameters:
predicate- the filter to apply- Returns:
- the traversal with an appended
AnyStep - Since:
- 3.7.1
- See Also:
-
none
FiltersElists given the providedpredicate.- Parameters:
predicate- the filter to apply- Returns:
- the traversal with an appended
NoneStep - Since:
- 3.8.0
- See Also:
-
sideEffect
Perform some operation on theTraverserand pass it to the next step unmodified.- Parameters:
consumer- the operation to perform at this step in relation to theTraverser- Returns:
- the traversal with an appended
LambdaSideEffectStep - Since:
- 3.0.0-incubating
- See Also:
-
sideEffect
Perform some operation on theTraverserand pass it to the next step unmodified.- Parameters:
sideEffectTraversal- the operation to perform at this step in relation to theTraverser- Returns:
- the traversal with an appended
TraversalSideEffectStep - Since:
- 3.0.0-incubating
- See Also:
-
cap
Iterates the traversal up to the itself and emits the side-effect referenced by the key. If multiple keys are supplied then the side-effects are emitted as aMap.- Parameters:
sideEffectKey- the side-effect to emitsideEffectKeys- other side-effects to emit- Returns:
- the traversal with an appended
SideEffectCapStep - Since:
- 3.0.0-incubating
- See Also:
-
subgraph
Extracts a portion of the graph being traversed into aGraphobject held in the specified side-effect key.- Parameters:
sideEffectKey- the name of the side-effect key that will hold the subgraph- Returns:
- the traversal with an appended
SubgraphStep - Since:
- 3.0.0-incubating
- See Also:
-
aggregate
Eagerly collects objects up to this step into a side-effect.- Parameters:
sideEffectKey- the name of the side-effect key that will hold the aggregated objects- Returns:
- the traversal with an appended
AggregateStep - Since:
- 3.0.0-incubating
- See Also:
-
group
Organize objects in the stream into aMap. Calls togroup()are typically accompanied withby()modulators which help specify how the grouping should occur.- Parameters:
sideEffectKey- the name of the side-effect key that will hold the aggregated grouping- Returns:
- the traversal with an appended
GroupStep. - Since:
- 3.0.0-incubating
- See Also:
-
groupCount
Counts the number of times a particular objects has been part of a traversal, returning aMapwhere the object is the key and the value is the count.- Parameters:
sideEffectKey- the name of the side-effect key that will hold the aggregated grouping- Returns:
- the traversal with an appended
GroupCountStep. - Since:
- 3.0.0-incubating
- See Also:
-
fail
When triggered, immediately throws aRuntimeExceptionwhich implements theFailureinterface. The traversal will be terminated as a result.- Returns:
- the traversal with an appended
FailStep. - Since:
- 3.6.0
- See Also:
-
fail
When triggered, immediately throws aRuntimeExceptionwhich implements theFailureinterface. The traversal will be terminated as a result.- Parameters:
message- the error message to include in the exception- Returns:
- the traversal with an appended
FailStep. - Since:
- 3.6.0
- See Also:
-
tree
Aggregates the emanating paths into aTreedata structure.- Parameters:
sideEffectKey- the name of the side-effect key that will hold the tree- Returns:
- the traversal with an appended
TreeStep - Since:
- 3.0.0-incubating
- See Also:
-
sack
Map theTraverserto itsTraverser.sack()value.- Parameters:
sackOperator- the operator to apply to the sack value- Returns:
- the traversal with an appended
SackStep. - Since:
- 3.0.0-incubating
- See Also:
-
profile
Allows developers to examine statistical information about a traversal providing data like execution times, counts, etc.- Parameters:
sideEffectKey- the name of the side-effect key within which to hold the profile object- Returns:
- the traversal with an appended
ProfileSideEffectStep - Since:
- 3.2.0-incubating
- See Also:
-
profile
Allows developers to examine statistical information about a traversal providing data like execution times, counts, etc.- Specified by:
profilein interfaceTraversal<S,E> - Returns:
- the traversal with an appended
ProfileSideEffectStep - Since:
- 3.0.0-incubating
- See Also:
-
property
default GraphTraversal<S,E> property(VertexProperty.Cardinality cardinality, Object key, Object value, Object... keyValues) Sets aPropertyvalue and related meta properties if supplied, if supported by theGraphand if theElementis aVertexProperty. This method is the long-hand version ofproperty(Object, Object, Object...)with the difference that theVertexProperty.Cardinalitycan be supplied. * Generally speaking, this method will append anAddPropertyStepContractto theTraversalbut when possible, this method will attempt to fold key/value pairs into anAddVertexStepContractorAddEdgeStepContract. This potential optimization can only happen if cardinality is not supplied and when meta-properties are not included.- Parameters:
cardinality- the specified cardinality of the property wherenullwill allow theGraphto use its default settingskey- the key for the propertyvalue- the value for the property which may not be null if thekeyis of typeTkeyValues- any meta properties to be assigned to this property- Returns:
- the traversal with the last step modified to add a property
- Since:
- 3.0.0-incubating
- See Also:
-
property
Sets the key and value of aProperty. If theElementis aVertexPropertyand theGraphsupports it, meta properties can be set. Use of this method assumes that theVertexProperty.Cardinalityis defaulted tonullwhich means that the default cardinality for theGraphwill be used. If aMapis supplied then each of the key/value pairs in the map will be added as property. This method is the long-hand version of looping through theproperty(Object, Object, Object...)method for each key/value pair supplied. If aCardinalityValueTraversalis specified as a value then it will override anyVertexProperty.Cardinalityspecified for thekey. This method is effectively callsproperty(VertexProperty.Cardinality, Object, Object, Object...)asproperty(null, key, value, keyValues.- Parameters:
key- the key for the propertyvalue- the value for the propertykeyValues- any meta properties to be assigned to this property- Returns:
- the traversal with the last step modified to add a property
- Since:
- 3.0.0-incubating
- See Also:
-
property
When aMapis supplied then each of the key/value pairs in the map will be added as property. This method is the long-hand version of looping through theproperty(Object, Object, Object...)method for each key/value pair supplied. A value may use aCardinalityValueTraversalto allow specification of theVertexProperty.Cardinalityalong with the property value itself. If aMapis not supplied then an exception is thrown. This method is effectively callsproperty(VertexProperty.Cardinality, Object, Object, Object...)asproperty(null, key, value, keyValues.- Parameters:
value- the value for the property- Returns:
- the traversal with the last step modified to add a property
- Since:
- 3.0.0-incubating
- See Also:
-
property
Sets properties on the current element using a child traversal that produces aMap. Each entry in the resulting Map becomes a property (key → value) on the element. The traversal is evaluated at execution time against the current traverser.- Parameters:
mapTraversal- a traversal that produces aMap<String, Object>of property key/value pairs- Returns:
- the traversal with the
AddPropertyStepPlaceholderadded - Since:
- 4.0.0
- See Also:
-
branch
Split theTraverserto all the specified traversals.- Parameters:
branchTraversal- the traversal to branch theTraverserto- Returns:
- the
Traversalwith theBranchStepadded - Since:
- 3.0.0-incubating
- See Also:
-
branch
Split theTraverserto all the specified functions.- Parameters:
function- the traversal to branch theTraverserto- Returns:
- the
Traversalwith theBranchStepadded - Since:
- 3.0.0-incubating
- See Also:
-
choose
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal. Achooseis modified byoption(M, org.apache.tinkerpop.gremlin.process.traversal.Traversal<?, E2>)which provides the various branch choices.- Parameters:
choiceTraversal- the traversal used to determine the value for the branch- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.0.0-incubating
- See Also:
-
choose
default <E2> GraphTraversal<S,E2> choose(Traversal<?, ?> traversalPredicate, Traversal<?, E2> trueChoice, Traversal<?, E2> falseChoice) Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.- Parameters:
traversalPredicate- the traversal used to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns truefalseChoice- the traversal to execute in the event thetraversalPredicatereturns false- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.0.0-incubating
- See Also:
-
choose
default <E2> GraphTraversal<S,E2> choose(Traversal<?, ?> traversalPredicate, Traversal<?, E2> trueChoice) Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.- Parameters:
traversalPredicate- the traversal used to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns true- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.2.4
- See Also:
-
choose
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal. Achooseis modified byoption(M, org.apache.tinkerpop.gremlin.process.traversal.Traversal<?, E2>)which provides the various branch choices.- Parameters:
t- extracts this value from an incoming element to match against an option- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.8.0
- See Also:
-
choose
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal. Achooseis modified byoption(M, org.apache.tinkerpop.gremlin.process.traversal.Traversal<?, E2>)which provides the various branch choices.- Parameters:
choiceFunction- the function used to determine the value for the branch- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.0.0-incubating
- See Also:
-
choose
default <E2> GraphTraversal<S,E2> choose(Predicate<E> choosePredicate, Traversal<?, E2> trueChoice, Traversal<?, E2> falseChoice) Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.- Parameters:
choosePredicate- the function used to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns truefalseChoice- the traversal to execute in the event thetraversalPredicatereturns false- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.0.0-incubating
- See Also:
-
choose
default <E2> GraphTraversal<S,E2> choose(P<E> choosePredicate, Traversal<?, E2> trueChoice, Traversal<?, E2> falseChoice) Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else like semantics within a traversal.Note: Traversal-bearing predicates (e.g.
P.gt(__.V(1).values("age"))) are not supported inchoose()and will throw anIllegalArgumentException.- Parameters:
choosePredicate- thePused to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns truefalseChoice- the traversal to execute in the event thetraversalPredicatereturns false- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.8.0
- See Also:
-
choose
Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.- Parameters:
choosePredicate- the function used to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns true- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.2.4
- See Also:
-
choose
Routes the current traverser to a particular traversal branch option which allows the creation of if-then like semantics within a traversal.Note: Traversal-bearing predicates (e.g.
P.gt(__.V(1).values("age"))) are not supported inchoose()and will throw anIllegalArgumentException.- Parameters:
choosePredicate- thePused to determine the "if" portion of the if-then-elsetrueChoice- the traversal to execute in the event thetraversalPredicatereturns true- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.8.0
- See Also:
-
optional
Returns the result of the specified traversal if it yields a result, otherwise it returns the calling element.- Parameters:
optionalTraversal- the traversal to execute for a potential result- Returns:
- the traversal with the appended
ChooseStep - Since:
- 3.0.0-incubating
- See Also:
-
union
Merges the results of an arbitrary number of traversals.- Parameters:
unionTraversals- the traversals to merge- Returns:
- the traversal with the appended
UnionStep - Since:
- 3.0.0-incubating
- See Also:
-
coalesce
Evaluates the provided traversals and returns the result of the first traversal to emit at least one object.- Parameters:
coalesceTraversals- the traversals to coalesce- Returns:
- the traversal with the appended
CoalesceStep - Since:
- 3.0.0-incubating
- See Also:
-
repeat
This step is used for looping over a traversal given some break predicate.- Parameters:
repeatTraversal- the traversal to repeat over- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
repeat
This step is used for looping over a traversal given some break predicate and with a specified loop name.- Parameters:
repeatTraversal- the traversal to repeat overloopName- The name given to the loop- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.4.0
- See Also:
-
emit
Emit is used in conjunction withrepeat(Traversal)to determine what objects get emit from the loop.- Parameters:
emitTraversal- the emit predicate defined as a traversal- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
emit
Emit is used in conjunction withrepeat(Traversal)to determine what objects get emit from the loop.- Parameters:
emitPredicate- the emit predicate- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
emit
Emit is used in conjunction withrepeat(Traversal)to emit all objects from the loop.- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
until
Modifies arepeat(Traversal)to determine when the loop should exit.- Parameters:
untilTraversal- the traversal that determines when the loop exits- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
until
Modifies arepeat(Traversal)to determine when the loop should exit.- Parameters:
untilPredicate- the predicate that determines when the loop exits- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
times
Modifies arepeat(Traversal)to specify how many loops should occur before exiting.- Parameters:
maxLoops- the number of loops to execute prior to exiting- Returns:
- the traversal with the appended
RepeatStep - Since:
- 3.0.0-incubating
- See Also:
-
local
Provides a execute a specified traversal on a single element within a stream.- Parameters:
localTraversal- the traversal to execute locally- Returns:
- the traversal with the appended
LocalStep - Since:
- 3.0.0-incubating
- See Also:
-
pageRank
Calculates a PageRank over the graph using a 0.85 for thealphavalue.- Returns:
- the traversal with the appended
PageRankVertexProgramStep - Since:
- 3.2.0-incubating
- See Also:
-
pageRank
Calculates a PageRank over the graph.- Returns:
- the traversal with the appended
PageRankVertexProgramStep - Since:
- 3.2.0-incubating
- See Also:
-
peerPressure
Executes a Peer Pressure community detection algorithm over the graph.- Returns:
- the traversal with the appended
PeerPressureVertexProgramStep - Since:
- 3.2.0-incubating
- See Also:
-
connectedComponent
Executes a Connected Component algorithm over the graph.- Returns:
- the traversal with the appended
ConnectedComponentVertexProgram - Since:
- 3.4.0
- See Also:
-
shortestPath
Executes a Shortest Path algorithm over the graph.- Returns:
- the traversal with the appended
ShortestPathVertexProgramStep - See Also:
-
program
Executes an arbitraryVertexProgramover the graph.- Returns:
- the traversal with the appended
ProgramVertexProgramStep - Since:
- 3.2.0-incubating
- See Also:
-
as
A step modulator that provides a label to the step that can be accessed later in the traversal by other steps.- Parameters:
stepLabel- the name of the stepstepLabels- additional names for the label- Returns:
- the traversal with the modified end step
- Since:
- 3.0.0-incubating
- See Also:
-
barrier
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier. In this case, it iterates the entire thing as the default barrier size is set toInteger.MAX_VALUE.- Returns:
- the traversal with an appended
NoOpBarrierStep - Since:
- 3.0.0-incubating
- See Also:
-
barrier
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier.- Parameters:
maxBarrierSize- the size of the barrier- Returns:
- the traversal with an appended
NoOpBarrierStep - Since:
- 3.0.0-incubating
- See Also:
-
index
Indexes all items of the current collection. The indexing format can be configured using thewith(String, Object)andWithOptions.indexer. Indexed as list: ["a","b","c"] => [["a",0],["b",1],["c",2]] Indexed as map: ["a","b","c"] => {0:"a",1:"b",2:"c"} If the current object is not a collection, this step will map the object to a single item collection/map: Indexed as list: "a" => ["a",0] Indexed as map: "a" => {0:"a"}- Returns:
- the traversal with an appended
IndexStep - Since:
- 3.4.0
- See Also:
-
barrier
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to the size of the barrier. In this case, it iterates the entire thing as the default barrier size is set toInteger.MAX_VALUE.- Parameters:
barrierConsumer- a consumer function that is applied to the objects aggregated to the barrier- Returns:
- the traversal with an appended
NoOpBarrierStep - Since:
- 3.2.0-incubating
- See Also:
-
with
Provides a configuration to a step in the form of a key which is the same aswith(key, true). The key of the configuration must be step specific and therefore a configuration could be supplied that is not known to be valid until execution.- Parameters:
key- the key of the configuration to apply to a step- Returns:
- the traversal with a modulated step
- Since:
- 3.4.0
- See Also:
-
with
Provides a configuration to a step in the form of a key and value pair. The key of the configuration must be step specific and therefore a configuration could be supplied that is not known to be valid until execution.- Parameters:
key- the key of the configuration to apply to a stepvalue- the value of the configuration to apply to a step- Returns:
- the traversal with a modulated step
- Since:
- 3.4.0
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. This form is essentially anidentity()modulation.- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified traversal.- Parameters:
traversal- the traversal to apply- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified token ofT.- Parameters:
token- the token to apply- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified key.- Parameters:
key- the key to apply- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
function- the function to apply- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
traversal- the traversal to applycomparator- the comparator to apply typically for someorder()- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
comparator- the comparator to apply typically for someorder()- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
order- the comparator to apply typically for someorder()- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
key- the key to apply traversalcomparator- the comparator to apply typically for someorder()- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
by
Theby()can be applied to a number of different step to alter their behaviors. Modifies the previous step with the specified function.- Parameters:
function- the function to applycomparator- the comparator to apply typically for someorder()- Returns:
- the traversal with a modulated step.
- Since:
- 3.0.0-incubating
- See Also:
-
option
This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step. Please see the documentation of such steps to understand the usage context.Note: When used with
choose(), traversal-bearing predicates are not supported as option tokens and will throw anIllegalArgumentException. -
option
This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step. Please see the documentation of such steps to understand the usage context.- Parameters:
m- Provides aMapas the option which is the same as doingconstant(m).- Returns:
- the traversal with the modulated step
- Since:
- 3.6.0
- See Also:
-
option
default <M,E2> GraphTraversal<S,E> option(Merge merge, Map<Object, Object> m, VertexProperty.Cardinality cardinality) This is a step modulator tomergeV()where the provided argument associated to thetokenis applied according to the semantics of the step. Please see the documentation of such steps to understand the usage context.- Parameters:
m- Provides aMapas the option which is the same as doingconstant(m).- Returns:
- the traversal with the modulated step
- Since:
- 3.7.0
- See Also:
-
option
This step modifieschoose(Function)to specifies the available choices that might be executed.- Parameters:
traversalOption- the option as a traversal- Returns:
- the traversal with the modulated step
- Since:
- 3.0.0-incubating
- See Also:
-
option
This is a step modulator to aTraversalOptionParentlikechoose()ormergeV()where the provided argument associated to thetokenis applied according to the semantics of the step. Please see the documentation of such steps to understand the usage context.- Parameters:
m- Provides aMapas the option which is the same as doingconstant(m).- Returns:
- the traversal with the modulated step
- Since:
- 3.8.0
- See Also:
-
read
This step is technically a step modulator for the theGraphTraversalSource.io(String)step which instructs the step to perform a read with its given configuration.- Returns:
- the traversal with the
IoStepmodulated to read - Since:
- 3.4.0
- See Also:
-
write
This step is technically a step modulator for the theGraphTraversalSource.io(String)step which instructs the step to perform a write with its given configuration.- Returns:
- the traversal with the
IoStepmodulated to write - Since:
- 3.4.0
- See Also:
-
iterate
Iterates the traversal presumably for the generation of side-effects.
-
dateDiff(OffsetDateTime).