Exemplo n.º 1
0
 @Override
 @SuppressWarnings("unchecked")
 public ASTPtrdeclaratorList clone() {
   ASTPtrdeclaratorList ret = new ASTPtrdeclaratorList();
   ret.setList((ArrayList<ASTPtrdeclarator>) list.clone());
   return ret;
 }
Exemplo n.º 2
0
 public ASTPtrdeclaratorList deepClone() {
   ASTPtrdeclaratorList result = new ASTPtrdeclaratorList();
   if (list.size() != 0) {
     Iterator<ASTPtrdeclarator> iter = iterator();
     while (iter.hasNext()) {
       result.add((ASTPtrdeclarator) iter.next().deepClone());
     }
   }
   for (de.monticore.ast.Comment x : get_PreComments()) {
     result.get_PreComments().add(new de.monticore.ast.Comment(x.getText()));
   }
   for (de.monticore.ast.Comment x : get_PostComments()) {
     result.get_PostComments().add(new de.monticore.ast.Comment(x.getText()));
   }
   return result;
 }
Exemplo n.º 3
0
 public boolean equalsWithComments(Object o) {
   ASTPtrdeclaratorList comp;
   if ((o instanceof ASTPtrdeclaratorList)) {
     comp = (ASTPtrdeclaratorList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     java.util.Iterator<ASTPtrdeclarator> one = this.iterator();
     java.util.Iterator<ASTPtrdeclarator> two = comp.iterator();
     while (one.hasNext()) {
       if (!one.next().equalsWithComments(two.next())) {
         return false;
       }
     }
   } else {
     return false;
   }
   return true;
 }
Exemplo n.º 4
0
 public boolean deepEqualsWithComments(Object o, boolean forceSameOrder) {
   ASTPtrdeclaratorList comp;
   if ((o instanceof ASTPtrdeclaratorList)) {
     comp = (ASTPtrdeclaratorList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     if (forceSameOrder) {
       java.util.Iterator<ASTPtrdeclarator> one = this.iterator();
       while (one.hasNext()) {
         ASTPtrdeclarator oneNext = one.next();
         boolean matchFound = false;
         java.util.Iterator<ASTPtrdeclarator> two = comp.iterator();
         while (two.hasNext()) {
           if (oneNext.deepEqualsWithComments(two.next(), forceSameOrder)) {
             matchFound = true;
             break;
           }
         }
         if (!matchFound) {
           return false;
         }
       }
     } else {
       java.util.Iterator<ASTPtrdeclarator> one = this.iterator();
       java.util.Iterator<ASTPtrdeclarator> two = comp.iterator();
       while (one.hasNext()) {
         if (!one.next().deepEqualsWithComments(two.next(), forceSameOrder)) {
           return false;
         }
       }
     }
   } else {
     return false;
   }
   return true;
 }
Exemplo n.º 5
0
 public boolean equals(ASTPtrdeclaratorList o) {
   return list.equals(o.getList());
 }
Exemplo n.º 6
0
 public void add(ASTPtrdeclarator o) {
   it.add(o);
   if (!t.is_Existent()) t.set_Existent(true);
 }