Interface ILabeledPath<N,​A>

  • Type Parameters:
    N - Type of node labels.
    A - Type of arcs/edge labels.
    All Superinterfaces:
    IPath<N>

    public interface ILabeledPath<N,​A>
    extends IPath<N>
    Same as IPath only that the edges can have labels.
    • Method Detail

      • getUnmodifiableAccessor

        ILabeledPath<N,​A> getUnmodifiableAccessor()
        Description copied from interface: IPath
        Creates an accessor to the path that cannot be changed. This can be useful for getters that want to return an immutable path.
        Specified by:
        getUnmodifiableAccessor in interface IPath<N>
        Returns:
        The unmodifiable accessor of the path.
      • extend

        void extend​(N newHead,
                    A arcToNewHead)
        Like in IPath, but the new arc is labeled as well.
        Parameters:
        newHead -
        arcToNewHead -
      • getPathToParentOfHead

        ILabeledPath<N,​A> getPathToParentOfHead()
        Description copied from interface: IPath
        Creates a new path object that is identical to the current path except that the head is removed. This is equivalent to creating a copy of the current path and invoke cutHead() on it.
        Specified by:
        getPathToParentOfHead in interface IPath<N>
        Returns:
        The copy of the current path with the head being the parent of the head of the current path.
      • getPathFromChildOfRoot

        ILabeledPath<N,​A> getPathFromChildOfRoot()
        Description copied from interface: IPath
        Creates a new path object that is identical to the current path except that the root is removed.
        Specified by:
        getPathFromChildOfRoot in interface IPath<N>
        Returns:
        The copy of the current path with the root being the second node of the current path.
      • getArcs

        java.util.List<A> getArcs()
        Returns:
        The list of labels of the arcs in the order of the path.
      • getInArc

        A getInArc​(N node)
        Parameters:
        node -
        Returns:
        The label of the arc leading to the given node
      • getOutArc

        A getOutArc​(N node)
        Parameters:
        node -
        Returns:
        The label of the arc going away from the given node
      • extend

        default void extend​(N newHead)
        Description copied from interface: IPath
        Modifies the path by adding a new node at the end.
        Specified by:
        extend in interface IPath<N>
        Parameters:
        newHead - The new head of the path.