-
- 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 GraphPath
append(String name)
Create a new path equivalent to this one with an additional name appended.boolean
equals(Object other)
Returnstrue
if the provided path equals this one,false
otherwise.String
getName()
Get the first name in this path.GraphPath
prepend(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.String
toString()
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
name
appended
-
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
name
prepended
-
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)
Returnstrue
if the provided path equals this one,false
otherwise. To be equal, the string serializations of each path must be identical.
-
-