code: public int disconnect(int v) {
          if (connected.remove(v)) {
              int removed = 0;
              BitSet b = inEdges.remove(v);
              if (b != null) {
                  int edges = b.cardinality();
                  size -= edges;
                  removed += edges;
              }
              b = outEdges.remove(v);
              if (b != null) {
                  int edges = b.cardinality();
                  size -= edges;
                  removed += edges;
              }
              assert removed > 0 :
                  "connected removed an edge that wasn't listed elsewhere";
              return removed;
          }
          return 0;
      }
docs: {@inheritDoc}