Class MutablePath
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.MutablePath
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Path
- Direct Known Subclasses:
DetachedPath,ReferencePath
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Path
Path.Exceptions -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanAdd a new step to the path with an object and any number of associated labels.Add labels to the head of the path.<A> Aget(int index) Get the object associated with the specified index into the path.<A> APop the object(s) associated with the label of the path.inthashCode()booleanReturn true if the path has the specified label, else return false.<A> Ahead()Get the head of the path.booleanisEmpty()Determine if the path is empty or not.iterator()labels()An ordered list of the labels associated with the path The set of labels for a particular step are ordered by the order in whichPath.extend(Object, Set)was called.static Pathmake()objects()An ordered list of the objects in the path.Remove labels from path.intsize()Get the number of step in the path.toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
objects
-
labels
-
-
Constructor Details
-
MutablePath
protected MutablePath()
-
-
Method Details
-
make
-
clone
-
isEmpty
public boolean isEmpty()Description copied from interface:PathDetermine if the path is empty or not. -
head
public <A> A head()Description copied from interface:PathGet the head of the path. -
size
public int size()Description copied from interface:PathGet the number of step in the path. -
extend
Description copied from interface:PathAdd a new step to the path with an object and any number of associated labels. -
extend
Description copied from interface:PathAdd labels to the head of the path. -
retract
Description copied from interface:PathRemove labels from path. -
get
public <A> A get(int index) Description copied from interface:PathGet the object associated with the specified index into the path. -
get
Description copied from interface:PathPop the object(s) associated with the label of the path. -
hasLabel
Description copied from interface:PathReturn true if the path has the specified label, else return false. -
objects
Description copied from interface:PathAn ordered list of the objects in the path. -
labels
Description copied from interface:PathAn ordered list of the labels associated with the path The set of labels for a particular step are ordered by the order in whichPath.extend(Object, Set)was called. -
iterator
-
toString
-
hashCode
public int hashCode() -
equals
-