Class EmptyPath

    • Method Detail

      • size

        public int size()
        Description copied from interface: Path
        Get the number of step in the path.
        Specified by:
        size in interface Path
        Returns:
        the size of the path
      • extend

        public Path extend​(Object object,
                           Set<String> labels)
        Description copied from interface: Path
        Add a new step to the path with an object and any number of associated labels.
        Specified by:
        extend in interface Path
        Parameters:
        object - the new head of the path
        labels - the labels at the head of the path
        Returns:
        the extended path
      • extend

        public Path extend​(Set<String> labels)
        Description copied from interface: Path
        Add labels to the head of the path.
        Specified by:
        extend in interface Path
        Parameters:
        labels - the labels at the head of the path
        Returns:
        the path with added labels
      • retract

        public Path retract​(Set<String> labels)
        Description copied from interface: Path
        Remove labels from path.
        Specified by:
        retract in interface Path
        Parameters:
        labels - the labels to remove
        Returns:
        the path with removed labels
      • get

        public <A> A get​(String label)
        Description copied from interface: Path
        Get the object associated with the particular label of the path. If the path as multiple labels of the type, then return a List of those objects.
        Specified by:
        get in interface Path
        Type Parameters:
        A - the type of the object associated with the label
        Parameters:
        label - the label of the path
        Returns:
        the object associated with the label of the path
      • get

        public <A> A get​(int index)
        Description copied from interface: Path
        Get the object associated with the specified index into the path.
        Specified by:
        get in interface Path
        Type Parameters:
        A - the type of the object associated with the index
        Parameters:
        index - the index of the path
        Returns:
        the object associated with the index of the path
      • hasLabel

        public boolean hasLabel​(String label)
        Description copied from interface: Path
        Return true if the path has the specified label, else return false.
        Specified by:
        hasLabel in interface Path
        Parameters:
        label - the label to search for
        Returns:
        true if the label exists in the path
      • objects

        public List<Object> objects()
        Description copied from interface: Path
        An ordered list of the objects in the path.
        Specified by:
        objects in interface Path
        Returns:
        the objects of the path
      • labels

        public List<Set<String>> labels()
        Description copied from interface: Path
        An ordered list of the labels associated with the path The set of labels for a particular step are ordered by the order in which Path.extend(Object, Set) was called.
        Specified by:
        labels in interface Path
        Returns:
        the labels of the path
      • isSimple

        public boolean isSimple()
        Description copied from interface: Path
        Determines whether the path is a simple or not. A simple path has no cycles and thus, no repeated objects.
        Specified by:
        isSimple in interface Path
        Returns:
        Whether the path is simple or not
      • instance

        public static Path instance()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object