public final Iterator<KnowledgeEdge> requiredEdgesIterator(){
  Set<KnowledgeEdge> edges=new HashSet<>();
  for (  OrderedPair<Set<MyNode>> o : requiredRulesSpecs) {
    final Set<MyNode> first=o.getFirst();
    for (    MyNode s1 : first) {
      final Set<MyNode> second=o.getSecond();
      for (      MyNode s2 : second) {
        if (!s1.equals(s2)) {
          edges.add(new KnowledgeEdge(s1.getName(),s2.getName()));
        }
      }
    }
  }
  return edges.iterator();
}

public final Iterator < KnowledgeEdge > requiredEdgesIterator ( ) { Set < KnowledgeEdge > edges = new HashSet < > ( ) ; for ( OrderedPair < Set < MyNode > > o : requiredRulesSpecs ) { final Set < MyNode > first = o . getFirst ( ) ; for ( MyNode s1 : first ) { final Set < MyNode > second = o . getSecond ( ) ; for ( MyNode s2 : second ) { if ( ! s1 . equals ( s2 ) ) { edges . add ( new KnowledgeEdge ( s1 . getName ( ) , s2 . getName ( ) ) ) ; } } } } return edges . iterator ( ) ; }
iterator over the knowledgeedge ' s representing required edges .
