Class TransitiveClosure


  • @API(EXPERIMENTAL)
    public class TransitiveClosure
    extends Object
    Utility class to provide helpers related to the computation of the transitive closure of a partial order.
    • Method Detail

      • transitiveClosure

        public static <T> com.google.common.collect.ImmutableSetMultimap<T,​T> transitiveClosure​(@Nonnull
                                                                                                      Set<T> set,
                                                                                                      @Nonnull
                                                                                                      com.google.common.collect.ImmutableSetMultimap<T,​T> dependsOnMap)
        Compute the transitive closure of the depends-on map that is passed in.
        Type Parameters:
        T - type
        Parameters:
        set - the set determining the universe of entities
        dependsOnMap - depends-on map
        Returns:
        the transitive closure