示例#1
0
 public String toString() {
   String str = "Atom(" + name + ")";
   if (child != null) {
     return str + "." + child.toString();
   }
   return str;
 }
示例#2
0
 public boolean equals(Object obj) {
   if (obj instanceof AtomData) {
     AtomData other = (AtomData) obj;
     if (name == null) {
       if (other.name != null) {
         return false;
       }
     } else {
       if (!name.equals(other.name)) {
         return false;
       }
     }
     if (child != null) {
       return child.equals(other.child);
     }
     return other.child == null;
   }
   return false;
 }