Package org.yamcs.xtce
Class PathElement
- java.lang.Object
-
- org.yamcs.xtce.PathElement
-
- All Implemented Interfaces:
Serializable
public class PathElement extends Object implements Serializable
Describes an element from an aggregate/array member access path For example, the third element from this path :
a/c[2]/d[0][5]/x
is:
name = "d"
index = [0, 5] both name and index can be null- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PathElement(String name, int[] index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PathElementfromString(String s)Creates a path element from a string likeint[]getIndex()StringgetName()static StringpathToString(PathElement[] path)Transforms the path into a string like
a/c[2]/d[0][5]/xStringtoString()Encodes the path element into a string like
-
-
-
Constructor Detail
-
PathElement
public PathElement(String name, int[] index)
-
-
Method Detail
-
toString
public String toString()
Encodes the path element into a string likename[idx_1][idx_2]..[idx_n]
-
fromString
public static PathElement fromString(String s)
Creates a path element from a string likename[idx_1][idx_2]..[idx_n]
-
getName
public String getName()
-
getIndex
public int[] getIndex()
-
pathToString
public static String pathToString(PathElement[] path)
Transforms the path into a string like
a/c[2]/d[0][5]/x- Parameters:
path-- Returns:
-
-