Open oliviercailloux opened 4 years ago
We have nothing. This does sound like something we ought to have. Thanks.
@cpovirk do you have a preference for which of the Graph types have collectors implemented or whether they're implemented in one PR or their own?
I'm initially thinking to start with adding graph/GraphCollectors
and defining a basic collector for ImmutableGraph
and moving forward from there.
Would you mind providing some guidance on any considerations you might have? I'm new to the codebase, definitely not sure of where the blindspots I have are yet.
Unfortunately, I know very little about common.graph
. One of its owners will have to have a look eventually, but I wouldn't expect that to happen soon :(
Are there collectors that create and populate graphs, that I perhaps have missed? For example, can I easily stream the entries of a
Map<K, K>
and return a (say, directed) graph that would contain the corresponding edges?If so, please document on the wiki.
If not, please consider adding a set of nice collectors, similar to those available for the guava collection classes!