code: private static int remapEdges(KamNode collapsing, KamNode collapseTo,
              Kam kam, PreparedStatement esps, PreparedStatement etps)
              throws SQLException {
          int updates = 0;
          Set<KamEdge> outgoing = kam.getAdjacentEdges(collapsing, FORWARD);
          int collapseToId = collapseTo.getId();
          for (KamEdge edge : outgoing) {
              esps.setInt(1, collapseToId);
              esps.setInt(2, edge.getId());
              updates += esps.executeUpdate();
          }
          Set<KamEdge> incoming = kam.getAdjacentEdges(collapsing, REVERSE);
          for (KamEdge edge : incoming) {
              etps.setInt(1, collapseToId);
              etps.setInt(2, edge.getId());
              updates += etps.executeUpdate();
          }
          return updates;
      }
docs: Remaps outgoing and incoming edges to {@code collapseTo}.
  
  @param collapsing {@link KamNode} being collapsed
  @param collapseTo {@link KamNode} collapsing to
  @param kam {@link Kam} to retrieve adjacent edges
  @param esps {@link PreparedStatement} for updating edge source
  @param etps {@link PreparedStatement} for updating edge target
  @return {@code int} update count
  @throws SQLException when a SQL error occurred with update