public final class ValueTraversal<T,V> extends AbstractLambdaTraversal<T,V>
Element
or Map
to avoid strategy application costs.Traversal.Admin<S,E>, Traversal.Exceptions, Traversal.Symbols
bypassTraversal
Constructor and Description |
---|
ValueTraversal(String propertyKey)
Creates an instance for the specified
propertyKey . |
ValueTraversal(String propertyKey,
Traversal.Admin<T,V> bypassTraversal)
Creates an instance with the
bypassTraversal set on construction. |
Modifier and Type | Method and Description |
---|---|
void |
addStart(Traverser.Admin<T> start)
Add a single
Traverser.Admin object to the head of the traversal. |
boolean |
equals(Object other) |
String |
getPropertyKey() |
V |
getValue()
|
int |
hashCode() |
boolean |
hasNext()
If there is a "start" traverser this method will return
true and otherwise false and in either
case will always return as such, irrespective of calls to next() . |
boolean |
isNoStarts()
Determines if there is a value to iterate from the
Traversal . |
V |
next()
Return the
value of the traverser and will continue to return it on subsequent calls. |
void |
reset()
Call the
Step.reset() method on every step in the traversal. |
String |
toString() |
addStep, applyStrategies, clone, getBypassTraversal, getBytecode, getGraph, getParent, getSideEffects, getSteps, getStrategies, getTraverserGenerator, getTraverserRequirements, isLocked, isRoot, nextTraverser, removeStep, setBypassTraversal, setGraph, setParent, setSideEffects, setStrategies
finalize, getClass, notify, notifyAll, wait, wait, wait
addStarts, addStep, equals, getEndStep, getStartStep, getTraversalSource, getTraverserSetSupplier, removeStep
public ValueTraversal(String propertyKey)
propertyKey
.public ValueTraversal(String propertyKey, Traversal.Admin<T,V> bypassTraversal)
bypassTraversal
set on construction.public V getValue()
public boolean isNoStarts()
Traversal
.public V next()
value
of the traverser and will continue to return it on subsequent calls. Calling methods
should account for this behavior on their own.public boolean hasNext()
true
and otherwise false
and in either
case will always return as such, irrespective of calls to next()
. Calling methods should account for
this behavior on their own.public void addStart(Traverser.Admin<T> start)
Traversal.Admin
Traverser.Admin
object to the head of the traversal. Users should typically not need
to call this method. For dynamic inject of data, they should use InjectStep
.addStart
in interface Traversal.Admin<T,V>
addStart
in class AbstractLambdaTraversal<T,V>
start
- a traverser to add to the traversalpublic String getPropertyKey()
public void reset()
Traversal.Admin
Step.reset()
method on every step in the traversal.reset
in interface Traversal.Admin<T,V>
reset
in class AbstractLambdaTraversal<T,V>
public int hashCode()
hashCode
in class AbstractLambdaTraversal<T,V>
public boolean equals(Object other)
equals
in class AbstractLambdaTraversal<T,V>
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.