コード例 #1
0
 public boolean equalsWithComments(Object o) {
   ASTRelationalexpressionList comp;
   if ((o instanceof ASTRelationalexpressionList)) {
     comp = (ASTRelationalexpressionList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     java.util.Iterator<ASTRelationalexpression> one = this.iterator();
     java.util.Iterator<ASTRelationalexpression> two = comp.iterator();
     while (one.hasNext()) {
       if (!one.next().equalsWithComments(two.next())) {
         return false;
       }
     }
   } else {
     return false;
   }
   return true;
 }
コード例 #2
0
 public boolean deepEqualsWithComments(Object o, boolean forceSameOrder) {
   ASTRelationalexpressionList comp;
   if ((o instanceof ASTRelationalexpressionList)) {
     comp = (ASTRelationalexpressionList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     if (forceSameOrder) {
       java.util.Iterator<ASTRelationalexpression> one = this.iterator();
       while (one.hasNext()) {
         ASTRelationalexpression oneNext = one.next();
         boolean matchFound = false;
         java.util.Iterator<ASTRelationalexpression> two = comp.iterator();
         while (two.hasNext()) {
           if (oneNext.deepEqualsWithComments(two.next(), forceSameOrder)) {
             matchFound = true;
             break;
           }
         }
         if (!matchFound) {
           return false;
         }
       }
     } else {
       java.util.Iterator<ASTRelationalexpression> one = this.iterator();
       java.util.Iterator<ASTRelationalexpression> two = comp.iterator();
       while (one.hasNext()) {
         if (!one.next().deepEqualsWithComments(two.next(), forceSameOrder)) {
           return false;
         }
       }
     }
   } else {
     return false;
   }
   return true;
 }