code: public boolean remove(Object o) {
          if (!(o instanceof WeightedDirectedTypedEdge))
              return false;
          
          @SuppressWarnings("unchecked")
          WeightedDirectedTypedEdge<T> e = (WeightedDirectedTypedEdge<T>)o;
  
          if (e.from() == rootVertex) {
              return outEdges.remove(e.to(), e);
          }
  
          else if (e.to() == rootVertex) {
              return inEdges.remove(e.from(), e);
          }
          return false;
      }
docs: {@inheritDoc}