|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.sposh.elements.LapPath
public final class LapPath
LapPath is used to describe path from the root of PoshPlan to
some subnode of the plan. The path consists from several links, each link
describes which cild of current node should be used to change into new
current node.
There are three major features we require:
1. Parse path from string
2. traverse plan according to the path and return the node.
3. serialize path to the string
Examples of serialized path:
/P:0/DC:0 - default plan, drive collection 0
/P:0/DC:0/S:1 - Drive collection 0, goal sense 1
/P:0/DC:0/DE:4 - fifth drive in the DC
/P:0/DC:0/DE:4/S:0 - first trigger sense of fifth drive in the DC
/P:0/DC:0/DE:4/A:0/AP:4 - reference to AP node.
| Method Summary | |
|---|---|
LapPath |
append(LapType type,
int id)
Create and return new LapPath by appending new link to all links of current path. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
static LapPath |
parse(String serializedPath)
Parse @serializedPath to |
String |
toString()
|
PoshElement |
traversePath(PoshPlan plan)
Methods with name traverseXYZ mean traverse from XYZ below xyzLink means gor from xyz below according to type and id. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public PoshElement traversePath(PoshPlan plan)
plan -
IllegalStateException - If path does not play nice with tree, e.g.
when paths wants sense subnode in AP, but there is none according to
syntax
IndexOutOfBoundsException - If some id on the path references to
nonexistent node.
public static LapPath parse(String serializedPath)
throws ParseException
serializedPath - LapPath in serialized form, e.g.
/P:0/DC:0/DE:1/S:1
ParseException
public LapPath append(LapType type,
int id)
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||