@param node the node @return true if the node is of degree 1.
(Node node)
| 318 | * @return true if the node is of degree 1. |
| 319 | */ |
| 320 | public boolean isExternal(Node node) { |
| 321 | if (!(node instanceof ReRootedNode)) { |
| 322 | throw new IllegalArgumentException("Node, " + node.toString() + " is not an instance of SimpleRootedNode. It is an instance of "+node.getClass().getName()); |
| 323 | } |
| 324 | return ((ReRootedNode)node).getChildren().size() == 0; |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * @param taxon the taxon |
no test coverage detected