Skip to content

Commit e40ba30

Browse files
add javadocs
1 parent e43a098 commit e40ba30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/io/github/bldl/graph/ClassHierarchyGraph.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ public Iterable<T> getVertices() {
6060
return vertices;
6161
}
6262

63+
/**
64+
* Determines whether one node is a descendant of another
65+
*
66+
* @param ancestor the presumed ancestor
67+
* @param descendant the presumed descendant
68+
* @return whether {@code descendant} is a descendant of {@code ancestor}
69+
*/
6370
public boolean isDescendant(T ancestor, T descendant) {
6471
Set<T> visited = new HashSet<>();
6572
dfs(ancestor, visited);

0 commit comments

Comments
 (0)