/** * computes and returns whether the passed node is neither the root, nor a * leaf node. * * @return <code>true</code> if <code>v</code> is neither a leaf nor a root */ public boolean isInternal(V v) { return isLeaf(v) == false && isRoot(v) == false; }
public E getParentEdge(V vertex) { if (isRoot(vertex)) return null; return delegate.getInEdges(vertex).iterator().next(); }
@Override public E getParentEdge(V vertex) { if (isRoot(vertex)) { return null; } return delegate.getInEdges(vertex).iterator().next(); }
/** * @param v the vertex to test * @return <code>true</code> if <code>v</code> is neither a leaf * nor a root */ public boolean isInternal(V v) { return isLeaf(v) == false && isRoot(v) == false; }