Package: groovy.util

## [Java] Class Iterables

- groovy.util.Iterables

-     public class Iterables
      extends Object

  Provides some iterable based generators.

  Since:
    5.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<K, T>` | `public static Iterator<Map<K, T>>` | `combine(Map<K, ? extends Iterable<T>> map)` An iterator returning a map for each combination of elements the iterables sources.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### <K, T> public static Iterator<Map<K, T>> combine(Map<K, ? extends Iterable<T>> map)

      An iterator returning a map for each combination of elements the iterables sources.

           assert Iterables.combine(x: 1..2, y: 'a'..'c').collect().toString()
               == '[[x:1, y:a], [x:1, y:b], [x:1, y:c], [x:2, y:a], [x:2, y:b], [x:2, y:c]]'
           assert Iterables.combine(x: 1..3, y: 'a'..'b').collect().toString()
               == '[[x:1, y:a], [x:1, y:b], [x:2, y:a], [x:2, y:b], [x:3, y:a], [x:3, y:b]]'

      Parameters:
        `map` - the named source iterables
      Returns:
        the output iterator of named combinations