load method

RBushDirect<T> load(
  1. Iterable<RBushElement<T>> items
)

Implementation

RBushDirect<T> load(Iterable<RBushElement<T>> items) {
  if (items.any((item) => _boxes.containsKey(item))) {
    throw StateError(
        'Cannot have duplicates in the tree, use RBush class for that.');
  }
  _tree.load(items);
  _boxes.addAll({for (final i in items) i.data: i});
  return this;
}