public class MutablePath extends Object implements Path, Serializable
Path.Exceptions
Modifier and Type | Field and Description |
---|---|
protected List<Set<String>> |
labels |
protected List<Object> |
objects |
Modifier | Constructor and Description |
---|---|
protected |
MutablePath() |
Modifier and Type | Method and Description |
---|---|
void |
addLabel(String label)
Add label to the current head of the path.
|
MutablePath |
clone() |
Path |
extend(Object object,
Set<String> labels)
Add a new step to the path with an object and any number of associated labels.
|
<A> A |
get(int index)
Get the object associated with the specified index into the path.
|
<A> A |
get(Pop pop,
String label)
Pop the object(s) associated with the 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
The set of labels for a particular step are ordered by the order in which
Path.addLabel(java.lang.String) was called. |
static Path |
make() |
List<Object> |
objects()
An ordered list of the objects in the path.
|
int |
size()
Get the number of step in the path.
|
String |
toString() |
public static Path make()
public MutablePath clone()
public int size()
Path
public Path extend(Object object, Set<String> labels)
Path
public <A> A get(int index)
Path
public <A> A get(Pop pop, String label)
Path
public boolean hasLabel(String label)
Path
public void addLabel(String label)
Path
public List<Object> objects()
Path
public List<Set<String>> labels()
Path
Path.addLabel(java.lang.String)
was called.Copyright © 2013–2015 Apache Software Foundation. All rights reserved.