public class SparsePath extends Object implements Path, Serializable
Path.Exceptions| Modifier | Constructor and Description |
|---|---|
protected |
SparsePath() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(String label)
Add label to the current head of the path.
|
Path |
clone() |
Path |
extend(Object object,
String... labels)
Add a new step to the path with an object and any number of associated labels.
|
<A> A |
get(String label)
Get the object associated with the particular label of the path.
|
boolean |
hasLabel(String label)
Return true if the path has the specified label, else return false.
|
List<Set<String>> |
labels()
An ordered list of the labels associated with the path
|
static SparsePath |
make() |
List<Object> |
objects()
An ordered list of the objects in the path.
|
int |
size()
Get the number of step in the path.
|
public static SparsePath make()
public Path extend(Object object, String... labels)
Pathpublic void addLabel(String label)
Pathpublic List<Object> objects()
Pathpublic List<Set<String>> labels()
Pathpublic <A> A get(String label) throws IllegalArgumentException
PathList of those objects.get in interface PathA - the type of the object associated with the labellabel - the label of the pathIllegalArgumentException - if the path does not contain the labelpublic boolean hasLabel(String label)
PathCopyright © 2013–2015 Apache Software Foundation. All rights reserved.