Пример #1
0
 @Override
 @SuppressWarnings("unchecked")
 public ASTUnannClassTypeList clone() {
   ASTUnannClassTypeList ret = new ASTUnannClassTypeList();
   ret.setList((ArrayList<ASTUnannClassType>) list.clone());
   return ret;
 }
Пример #2
0
 public ASTUnannClassTypeList deepClone() {
   ASTUnannClassTypeList result = new ASTUnannClassTypeList();
   if (list.size() != 0) {
     Iterator<ASTUnannClassType> iter = iterator();
     while (iter.hasNext()) {
       result.add((ASTUnannClassType) 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;
 }
Пример #3
0
 public boolean equalsWithComments(Object o) {
   ASTUnannClassTypeList comp;
   if ((o instanceof ASTUnannClassTypeList)) {
     comp = (ASTUnannClassTypeList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     java.util.Iterator<ASTUnannClassType> one = this.iterator();
     java.util.Iterator<ASTUnannClassType> two = comp.iterator();
     while (one.hasNext()) {
       if (!one.next().equalsWithComments(two.next())) {
         return false;
       }
     }
   } else {
     return false;
   }
   return true;
 }
Пример #4
0
 public boolean deepEqualsWithComments(Object o, boolean forceSameOrder) {
   ASTUnannClassTypeList comp;
   if ((o instanceof ASTUnannClassTypeList)) {
     comp = (ASTUnannClassTypeList) o;
   } else {
     return false;
   }
   if (this.size() == comp.size()) {
     if (forceSameOrder) {
       java.util.Iterator<ASTUnannClassType> one = this.iterator();
       while (one.hasNext()) {
         ASTUnannClassType oneNext = one.next();
         boolean matchFound = false;
         java.util.Iterator<ASTUnannClassType> two = comp.iterator();
         while (two.hasNext()) {
           if (oneNext.deepEqualsWithComments(two.next(), forceSameOrder)) {
             matchFound = true;
             break;
           }
         }
         if (!matchFound) {
           return false;
         }
       }
     } else {
       java.util.Iterator<ASTUnannClassType> one = this.iterator();
       java.util.Iterator<ASTUnannClassType> two = comp.iterator();
       while (one.hasNext()) {
         if (!one.next().deepEqualsWithComments(two.next(), forceSameOrder)) {
           return false;
         }
       }
     }
   } else {
     return false;
   }
   return true;
 }
Пример #5
0
 public boolean equals(ASTUnannClassTypeList o) {
   return list.equals(o.getList());
 }
Пример #6
0
 public void add(ASTUnannClassType o) {
   it.add(o);
   if (!t.is_Existent()) t.set_Existent(true);
 }