code: private static IBond[] neighbors(int v, int[][] g, EdgeToBondMap bondMap) {
          int[]   ws    = g[v];
          IBond[] bonds = new IBond[ws.length];
          for (int i = 0; i < ws.length; i++) {
              bonds[i] = bondMap.get(v, ws[i]);
          }
          return bonds;
      }
docs: Helper method to obtain the neighbouring bonds from an adjacency list
  graph and edge->bond map.
  
  @param v       vertex
  @param g       graph (adj list)
  @param bondMap map of edges to bonds
  @return neighboring bonds