Interface GraphPath

  • All Superinterfaces:
    Serializable

    public interface GraphPath
    extends Serializable
    A sequence of names typically used to identify elements within nested namespaces.
    • 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.
        Overrides:
        toString in class Object
        Returns:
        The string serialization of this path
      • 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)
        Returns true if the provided path equals this one, false otherwise. To be equal, the string serializations of each path must be identical.
        Overrides:
        equals in class Object
        Parameters:
        other - The provided path to which to compare
        Returns:
        true if the provided path equals this one, false otherwise