/** * Indicates if there is at least one edee leading to or from given vertex * * @return <code>true</code> if this vertex is connected with other vertex,<code>false</code> otherwise */ public boolean isConnected() { return isRoot() || isLeaf(); }
/** * Return the list of labels of successor in order decided by topological sort * * @param label The label of the vertex whose predecessors are searched * @return The list of labels. Returned list contains also the label passed as parameter to this method. This label * should always be the last item in the list. */ public List<String> getSuccessorLabels( final String label ) { final Vertex vertex = getVertex( label ); final List<String> retValue; // optimization. if ( vertex.isLeaf() ) { retValue = new ArrayList<String>( 1 ); retValue.add( label ); } else { retValue = TopologicalSorter.sort( vertex ); } return retValue; }