-
- All Superinterfaces:
Serializable
public interface GraphPath extends Serializable
A sequence of names typically used to identify elements within nested namespaces.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphPathappend(String name)Create a new path equivalent to this one with an additional name appended.booleanequals(Object other)Returnstrueif the provided path equals this one,falseotherwise.StringgetName()Get the first name in this path.GraphPathprepend(String name)Create a new path equivalent to this one with an additional name prepended.String[]toArray()Get a copy of the names in this path as an array of strings.StringtoString()Get the serialization of this path as a string.
-
-
-
Method Detail
-
getName
String getName()
Get the first name in this path.- Returns:
- The first name of this path
-
append
GraphPath append(String name)
Create a new path equivalent to this one with an additional name appended. For example, appending "entry3" to the path "entry1.entry2" would yield the path "entry1.entry2.entry3".- Parameters:
name- The name to append to the new path- Returns:
- A new path equivalent to this one with
nameappended
-
prepend
GraphPath prepend(String name)
Create a new path equivalent to this one with an additional name prepended. For example, prepending "entry1" to the path "entry2.entry3" would yield the path "entry1.entry2.entry3".- Parameters:
name- The name to prepend to the new path- Returns:
- A new path equivalent to this one with
nameprepended
-
toString
String toString()
Get the serialization of this path as a string. Names in the path will be separated by the default separator.
-
toArray
String[] toArray()
Get a copy of the names in this path as an array of strings.- Returns:
- A copy of the names in this path as an array of strings
-
equals
boolean equals(Object other)
Returnstrueif the provided path equals this one,falseotherwise. To be equal, the string serializations of each path must be identical.
-
-