public static <NodeType extends IGraphNode<NodeType>> boolean isRootNode(final NodeType node) {
    return node.getParents().size() == 0;
  }
Determines whether a given node is a root node.

@param <NodeType> Type of the node.
@param node The node in question.
@return True, if the node is a root node. False, otherwise.
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/graphs/GraphAlgorithms.java