Class ValueTraversal<T,V>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.lambda.AbstractLambdaTraversal<T,V>
org.apache.tinkerpop.gremlin.process.traversal.lambda.ValueTraversal<T,V>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<V>,Traversal<T,,V> Traversal.Admin<T,V>
More efficiently extracts a value from an
Element or Map to avoid strategy application costs.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal
Traversal.Admin<S,E>, Traversal.Exceptions, Traversal.Symbols -
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.lambda.AbstractLambdaTraversal
bypassTraversal, gValueManager -
Constructor Summary
ConstructorsConstructorDescriptionValueTraversal(String propertyKey) Creates an instance for the specifiedpropertyKey.ValueTraversal(String propertyKey, Traversal.Admin<T, V> bypassTraversal) Creates an instance with thebypassTraversalset on construction. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStart(Traverser.Admin<T> start) Add a singleTraverser.Adminobject to the head of the traversal.booleangetValue()inthashCode()booleanhasNext()If there is a "start" traverser this method will returntrueand otherwisefalseand in either case will always return as such, irrespective of calls tonext().booleanDetermines if there is a value to iterate from theTraversal.next()Return thevalueof the traverser and will continue to return it on subsequent calls.voidreset()Call theStep.reset()method on every step in the traversal.toString()Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.lambda.AbstractLambdaTraversal
addStep, applyStrategies, clone, getBypassTraversal, getGraph, getGremlinLang, getGValueManager, getParent, getSideEffects, getSteps, getStrategies, getTraverserGenerator, getTraverserRequirements, isLocked, isRoot, lock, nextTraverser, removeStep, setBypassTraversal, setGraph, setGValueManager, setParent, setSideEffects, setStrategiesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal
asAdmin, close, discard, explain, fill, forEachRemaining, forEachRemaining, iterate, next, notifyClose, profile, promise, toBulkSet, toList, toSet, toStream, tryNextMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal.Admin
addStarts, addStep, equals, getEndStep, getStartStep, getTraversalSource, getTraverserSetSupplier, removeStep
-
Constructor Details
-
ValueTraversal
Creates an instance for the specifiedpropertyKey. -
ValueTraversal
Creates an instance with thebypassTraversalset on construction.
-
-
Method Details
-
getValue
-
isNoStarts
public boolean isNoStarts()Determines if there is a value to iterate from theTraversal. -
next
Return thevalueof the traverser and will continue to return it on subsequent calls. Calling methods should account for this behavior on their own. -
hasNext
public boolean hasNext()If there is a "start" traverser this method will returntrueand otherwisefalseand in either case will always return as such, irrespective of calls tonext(). Calling methods should account for this behavior on their own. -
addStart
Description copied from interface:Traversal.AdminAdd a singleTraverser.Adminobject to the head of the traversal. Users should typically not need to call this method. For dynamic inject of data, they should useInjectStep.- Specified by:
addStartin interfaceTraversal.Admin<T,V> - Overrides:
addStartin classAbstractLambdaTraversal<T,V> - Parameters:
start- a traverser to add to the traversal
-
getPropertyKey
-
reset
public void reset()Description copied from interface:Traversal.AdminCall theStep.reset()method on every step in the traversal.- Specified by:
resetin interfaceTraversal.Admin<T,V> - Overrides:
resetin classAbstractLambdaTraversal<T,V>
-
toString
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractLambdaTraversal<T,V>
-
equals
- Overrides:
equalsin classAbstractLambdaTraversal<T,V>
-