/** * Generate rendering element(s) for the current bond, including ring * elements if this bond is part of a ring. * * @param currentBond the bond to use when generating elements * @param model the renderer model * @return one or more rendering elements */ public IRenderingElement generate(IBond currentBond, RendererModel model) { IRing ring = RingSetManipulator.getHeaviestRing(ringSet, currentBond); if (ring != null) { return generateRingElements(currentBond, ring, model); } else { return generateBond(currentBond, model); } }
@Test public void testGetHeaviestRing_IRingSet_IBond() { IRing ring = RingSetManipulator.getHeaviestRing(ringset, bondRing2Ring3); Assert.assertEquals(ring2, ring); }