Atom extends AtomType implements IAtom, Serializable, Cloneable { @Override public boolean compare(Object object) { if (!(object instanceof IAtom)) { return false; } if (!super.compare(object)) { return false; } Atom atom = (Atom) object; if (((point2d == atom.point2d) || ((point2d != null) && (point2d.equals(atom.point2d)))) && ((point3d == atom.point3d) || ((point3d != null) && (point3d.equals(atom.point3d)))) && (Objects.equals(hydrogenCount, atom.hydrogenCount)) && (Objects.equals(stereoParity, atom.stereoParity)) && (Objects.equals(charge, atom.charge))) { return true; } return false; } Atom();  Atom(int elem);  Atom(int elem, int hcnt);  Atom(int elem, int hcnt, int fchg);  Atom(String symbol);  Atom(String elementSymbol, Point3d point3d);  Atom(String elementSymbol, Point2d point2d);  Atom(IElement element); @Override IAtomContainer getContainer(); @Override int getIndex(); @Override Iterable<IBond> bonds(); @Override int getBondCount(); @Override IBond getBond(IAtom atom); @Override void setCharge(Double charge); @Override Double getCharge(); @Override void setImplicitHydrogenCount(Integer hydrogenCount); @Override Integer getImplicitHydrogenCount(); @Override void setPoint2d(Point2d point2d); @Override void setPoint3d(Point3d point3d); @Override void setFractionalPoint3d(Point3d point3d); @Override void setStereoParity(Integer stereoParity); @Override Point2d getPoint2d(); @Override Point3d getPoint3d(); @Override Point3d getFractionalPoint3d(); @Override Integer getStereoParity(); @Override boolean compare(Object object); @Override boolean isAromatic(); @Override void setIsAromatic(boolean arom); @Override boolean isInRing(); @Override void setIsInRing(boolean ring); @Override String toString(); @Override IAtom clone(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test @Override public void testCompare_Object() { IAtom someAtom = new Atom("C"); if (someAtom instanceof org.openscience.cdk.Atom) { org.openscience.cdk.Atom atom = (org.openscience.cdk.Atom) someAtom; Assert.assertTrue(atom.compare(atom)); IAtom hydrogen = someAtom.getBuilder().newInstance(IAtom.class, "H"); Assert.assertFalse(atom.compare(hydrogen)); Assert.assertFalse(atom.compare("C")); } }