public DagIterator(Graph pattern){
  for (  Edge edge : pattern.getEdges()) {
    if (Edges.isDirectedEdge(edge) || Edges.isUndirectedEdge(edge)) {
      continue;
    }
    throw new IllegalArgumentException("The graph may consist only of " + "directed and undirected edges: " + edge);
  }
  decoratedGraphs.add(new DecoratedGraph(pattern));
}

public DagIterator ( Graph pattern ) { for ( Edge edge : pattern . getEdges ( ) ) { if ( Edges . isDirectedEdge ( edge ) || Edges . isUndirectedEdge ( edge ) ) { continue ; } throw new IllegalArgumentException ( "The graph may consist only of " + "directed and undirected edges: " + edge ) ; } decoratedGraphs . add ( new DecoratedGraph ( pattern ) ) ; }
the given pattern must be a pattern . if it does not consist entirely of directed and undirected edges and if it is not acyclic , it is rejected .
