code: public boolean add(DirectedEdge e) {
          if (e.from() == rootVertex) {
              return outEdges.add(e.to());
          }
          else if (e.to() == rootVertex) {
              return inEdges.add(e.from());
          }
          return false;
      }
docs: Adds the edge to this set if one of the vertices is the root vertex and
  if the non-root vertex has a greater index that this vertex.