@Override
 public void visit(final UnionType n, final A arg) {
   visitComment(n.getComment(), arg);
   visitAnnotations(n, arg);
   for (ReferenceType element : n.getElements()) {
     element.accept(this, arg);
   }
 }
  @Override
  public Boolean visit(final UnionType n1, final Node arg) {
    final UnionType n2 = (UnionType) arg;

    List<ReferenceType> n1Elements = n1.getElements();
    List<ReferenceType> n2Elements = n2.getElements();

    if (n1Elements != null && n2Elements != null) {
      if (n1Elements.size() != n2Elements.size()) {
        return Boolean.FALSE;
      } else {
        int i = 0;
        for (ReferenceType aux : n1Elements) {
          if (aux.accept(this, n2Elements.get(i))) {
            return Boolean.FALSE;
          }
          i++;
        }
      }
    } else if (n1Elements != n2Elements) {
      return Boolean.FALSE;
    }
    return Boolean.TRUE;
  }