Package ghidra.graph

Class GraphPath<V>

  • Type Parameters:
    V -

    public class GraphPath<V>
    extends java.lang.Object
    Class for storing paths with fast "contains" method. Note: a path can only contain a vertex once.
    • Constructor Detail

      • GraphPath

        public GraphPath()
      • GraphPath

        public GraphPath​(V v)
    • Method Detail

      • startsWith

        public boolean startsWith​(GraphPath<V> otherPath)
      • size

        public int size()
      • contains

        public boolean contains​(V v)
      • add

        public void add​(V v)
      • getLast

        public V getLast()
      • depth

        public int depth​(V v)
      • get

        public V get​(int depth)
      • removeLast

        public V removeLast()
      • getPredecessors

        public java.util.Set<V> getPredecessors​(V v)
        Returns all entries that are before the given vertex in this path. The results will include the vertex.
        Parameters:
        v - the vertex
        Returns:
        the predecessors
      • getSuccessors

        public java.util.Set<V> getSuccessors​(V v)
        Returns all entries that are later in this path than the given vertex. The results will include the vertex.
        Parameters:
        v - the vertex
        Returns:
        the successors
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • subPath

        public GraphPath<V> subPath​(int start,
                                    int end)