BondRefinable implements Refinable { @Override public int getConnectivity(int vertexI, int vertexJ) { int indexInRow; int maxRowIndex = connectionTable[vertexI].length; for (indexInRow = 0; indexInRow < maxRowIndex; indexInRow++) { if (connectionTable[vertexI][indexInRow] == vertexJ) { return 1; } } return 0; } BondRefinable(IAtomContainer atomContainer);  BondRefinable(IAtomContainer atomContainer, boolean ignoreBondOrders); @Override int getVertexCount(); @Override int getConnectivity(int vertexI, int vertexJ); @Override Invariant neighboursInBlock(Set<Integer> block, int vertexIndex); Partition getInitialPartition();  }
@Test public void getConnectivity() { String acpString = "C0C1C2C3 0:1(1),0:3(1),1:2(1),2:3(1)"; BondRefinable bondRefinable = refinable(acpString); assertEquals(1, bondRefinable.getConnectivity(0, 1)); assertEquals(1, bondRefinable.getConnectivity(0, 2)); assertEquals(1, bondRefinable.getConnectivity(1, 3)); assertEquals(1, bondRefinable.getConnectivity(2, 3)); }