addEntryOrdered method

  1. @override
void addEntryOrdered (
  1. T e
)
override

Implementation

@override
void addEntryOrdered(T e) {
  if (e == null) return;

  if (_values == null) {
    _values = List<T>();
  }

  calcMinMax1(e);

  if (_values.length > 0 && _values[_values.length - 1].x > e.x) {
    int closestIndex = getEntryIndex1(e.x, e.y, Rounding.UP);
    _values.insert(closestIndex, e);
  } else {
    _values.add(e);
  }
}