union<E> static method

Iterable<E> union<E>(
  1. Iterable<E> iterable1,
  2. Iterable<E> iterable2
)

Returns an Iterable containing the union of the given Iterable. The cardinality of each element in the returned Iterable will be equal to the maximum of the cardinality of that element in the two given Iterable.

Implementation

static Iterable<E> union<E>(
    final Iterable<E> iterable1, final Iterable<E> iterable2) {
  final a = Set.of(iterable1);
  final b = Set.of(iterable2);
  return a.union(b);
}