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