addAll method

void addAll(
  1. Iterable<T>? values, {
  2. int compare(
    1. T v1,
    2. T v2
    )? = null,
})

Adds the values to the tree.

If supplied, compare is used to compare an element from values with a value already present in the tree. compare must be consistent with the ordering of values already present in this tree, but it may supply a more efficient implementation of the comparison operation for this very invocation of addAll.

Implementation

void addAll(Iterable<T>? values, {int compare(T v1, T v2)?: null}) {
  if (values == null) return;
  values.forEach((s) => add(s, compare: compare));
}