Class EmptyPath
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyPath
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Object>
,Path
public final class EmptyPath extends Object implements Path, Serializable
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Path
Path.Exceptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyPath
clone()
boolean
equals(Object object)
Path
extend(Object object, Set<String> labels)
Add a new step to the path with an object and any number of associated labels.Path
extend(Set<String> labels)
Add labels to the head of the path.<A> A
get(int index)
Get the object associated with the specified index into the path.<A> A
get(String label)
Get the object associated with the particular label of the path.int
hashCode()
boolean
hasLabel(String label)
Return true if the path has the specified label, else return false.static Path
instance()
boolean
isSimple()
Determines whether the path is a simple or not.List<Set<String>>
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.List<Object>
objects()
An ordered list of the objects in the path.Path
retract(Set<String> labels)
Remove labels from path.int
size()
Get the number of step in the path.String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
size
public int size()
Description copied from interface:Path
Get the number of step in the path.
-
extend
public Path extend(Object object, Set<String> labels)
Description copied from interface:Path
Add a new step to the path with an object and any number of associated labels.
-
extend
public Path extend(Set<String> labels)
Description copied from interface:Path
Add labels to the head of the path.
-
retract
public Path retract(Set<String> labels)
Description copied from interface:Path
Remove labels from path.
-
get
public <A> A get(String label)
Description copied from interface:Path
Get the object associated with the particular label of the path. If the path as multiple labels of the type, then return aList
of those objects.
-
get
public <A> A get(int index)
Description copied from interface:Path
Get the object associated with the specified index into the path.
-
hasLabel
public boolean hasLabel(String label)
Description copied from interface:Path
Return true if the path has the specified label, else return false.
-
objects
public List<Object> objects()
Description copied from interface:Path
An ordered list of the objects in the path.
-
labels
public List<Set<String>> labels()
Description copied from interface:Path
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.
-
isSimple
public boolean isSimple()
Description copied from interface:Path
Determines whether the path is a simple or not. A simple path has no cycles and thus, no repeated objects.
-
clone
public EmptyPath clone()
-
instance
public static Path instance()
-
-