rebalanceWhere method

void rebalanceWhere(
  1. bool test(
    1. Component element
    )
)
inherited

Allows you to rebalance only a portion of the tree. If you are dealing with non-deterministic compare functions, you probably need to consider rebalancing. If the priority function changed for certain known elements but not all, you can use this instead of rebalanceAll. In general be careful with using comparing functions that can change. Note: rebalancing is not stable.

Implementation

void rebalanceWhere(bool Function(E element) test) {
  final elements = removeWhere(test);
  addAll(elements);
}