code: public Set<WeightedEdge> getEdges(int vertex) {
          return (edges.containsKey(vertex))
              ? Collections.<WeightedEdge>singleton(
                  new SimpleWeightedEdge(rootVertex, vertex, edges.get(vertex)))
              : Collections.<WeightedEdge>emptySet();
      }
docs: {@inheritDoc}