code: private static IRingSet toRingSet(IAtomContainer container, int[][] cycles, EdgeToBondMap bondMap) {
  
          // note currently no way to say the size of the RingSet
          // even through we know it
          IChemObjectBuilder builder = container.getBuilder();
          IRingSet rings = builder.newInstance(IRingSet.class);
  
          for (int[] cycle : cycles) {
              rings.addAtomContainer(toRing(container, cycle, bondMap));
          }
  
          return rings;
      }
docs: Internal - convert a set of cycles to an ring set.
  
  @param container molecule
  @param cycles    a cycle of the chemical graph
  @param bondMap   mapping of the edges (int,int) to the bonds of the
  container
  @return the ring set