- All Superinterfaces:
Serializable
A sequence of names typically used to identify elements within nested
namespaces.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new path equivalent to this one with an additional name appended.booleanReturnstrueif the provided path equals this one,falseotherwise.getName()Get the first name in this path.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.toString()Get the serialization of this path as a string.
-
Method Details
-
getName
String getName()Get the first name in this path.- Returns:
- The first name of this path
-
append
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
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
Returnstrueif the provided path equals this one,falseotherwise. To be equal, the string serializations of each path must be identical.
-