Package ghidra.graph
Class GraphPath<V>
- java.lang.Object
-
- ghidra.graph.GraphPath<V>
-
- Type Parameters:
V-
public class GraphPath<V> extends java.lang.ObjectClass for storing paths with fast "contains" method. Note: a path can only contain a vertex once.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(V v)booleancontains(V v)GraphPath<V>copy()intdepth(V v)Vget(int depth)GraphPath<V>getCommonStartPath(GraphPath<V> other)VgetLast()java.util.Set<V>getPredecessors(V v)Returns all entries that are before the given vertex in this path.java.util.Set<V>getSuccessors(V v)Returns all entries that are later in this path than the given vertex.VremoveLast()intsize()booleanstartsWith(GraphPath<V> otherPath)GraphPath<V>subPath(int start, int end)java.lang.StringtoString()
-
-
-
Constructor Detail
-
GraphPath
public GraphPath()
-
GraphPath
public GraphPath(V v)
-
-
Method Detail
-
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:
toStringin classjava.lang.Object
-
-