Class ReadOnlyPathAccessor<N,​A>

  • All Implemented Interfaces:
    org.api4.java.datastructure.graph.ILabeledPath<N,​A>, org.api4.java.datastructure.graph.IPath<N>

    public class ReadOnlyPathAccessor<N,​A>
    extends java.lang.Object
    implements org.api4.java.datastructure.graph.ILabeledPath<N,​A>
    • Constructor Detail

      • ReadOnlyPathAccessor

        public ReadOnlyPathAccessor​(org.api4.java.datastructure.graph.ILabeledPath<N,​A> path)
    • Method Detail

      • getUnmodifiableAccessor

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getUnmodifiableAccessor()
        Specified by:
        getUnmodifiableAccessor in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getUnmodifiableAccessor in interface org.api4.java.datastructure.graph.IPath<N>
      • getRoot

        public N getRoot()
        Specified by:
        getRoot in interface org.api4.java.datastructure.graph.IPath<N>
      • getHead

        public N getHead()
        Specified by:
        getHead in interface org.api4.java.datastructure.graph.IPath<N>
      • getParentOfHead

        public N getParentOfHead()
        Specified by:
        getParentOfHead in interface org.api4.java.datastructure.graph.IPath<N>
      • extend

        public void extend​(N newHead,
                           A arcToNewHead)
        Specified by:
        extend in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • cutHead

        public void cutHead()
        Specified by:
        cutHead in interface org.api4.java.datastructure.graph.IPath<N>
      • getPathToParentOfHead

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getPathToParentOfHead()
        Specified by:
        getPathToParentOfHead in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getPathToParentOfHead in interface org.api4.java.datastructure.graph.IPath<N>
      • getPathFromChildOfRoot

        public org.api4.java.datastructure.graph.ILabeledPath<N,​A> getPathFromChildOfRoot()
        Specified by:
        getPathFromChildOfRoot in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
        Specified by:
        getPathFromChildOfRoot in interface org.api4.java.datastructure.graph.IPath<N>
      • getNodes

        public java.util.List<N> getNodes()
        Specified by:
        getNodes in interface org.api4.java.datastructure.graph.IPath<N>
      • isPoint

        public boolean isPoint()
        Specified by:
        isPoint in interface org.api4.java.datastructure.graph.IPath<N>
      • getNumberOfNodes

        public int getNumberOfNodes()
        Specified by:
        getNumberOfNodes in interface org.api4.java.datastructure.graph.IPath<N>
      • getArcs

        public java.util.List<A> getArcs()
        Specified by:
        getArcs in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • getInArc

        public A getInArc​(N node)
        Specified by:
        getInArc in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • getOutArc

        public A getOutArc​(N node)
        Specified by:
        getOutArc in interface org.api4.java.datastructure.graph.ILabeledPath<N,​A>
      • containsNode

        public boolean containsNode​(N node)
        Specified by:
        containsNode in interface org.api4.java.datastructure.graph.IPath<N>