Package ghidra.graph
Class GraphPath<V>
- java.lang.Object
-
- ghidra.graph.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(V v)
boolean
contains(V v)
GraphPath<V>
copy()
int
depth(V v)
V
get(int depth)
GraphPath<V>
getCommonStartPath(GraphPath<V> other)
V
getLast()
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.V
removeLast()
int
size()
boolean
startsWith(GraphPath<V> otherPath)
GraphPath<V>
subPath(int start, int end)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-