java.lang.Object
com.pervasive.datarush.graphs.GraphPaths
Factory for generating paths which provides for a standard separator and an
escaping mechanism. All names in an path are escaped which ensures
GraphPath.toString() and parse(String) are inverses.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the first element of the pathstatic StringReturns the last element of the pathstatic final GraphPathDe-serializes a path from the given string.static final GraphPathCreate a path containing a single name.static final GraphPathCreate a path containing the given sequence of names.static GraphPathReturns aGraphPathconsisting of all but the first element of the path
-
Method Details
-
first
Returns the first element of the path- Parameters:
path- the graph path- Returns:
- the first element of the path
-
last
Returns the last element of the path- Parameters:
path- the graph path- Returns:
- the last element of the path
-
remainder
Returns aGraphPathconsisting of all but the first element of the path- Parameters:
path- the original path- Returns:
- all but the first element of the path
- Throws:
IllegalArgumentException- if the path does not have at least two elements
-
path
Create a path containing a single name.- Parameters:
name- The name to convert to a path- Returns:
- A path consisting only of
name
-
path
Create a path containing the given sequence of names.- Parameters:
names- An array of names to convert to a path- Returns:
- A path consisting of the elements of
namesin their original order
-
parse
De-serializes a path from the given string.- Parameters:
pathString- String serialization of a path- Returns:
- The path whose serialization is
pathString
-