docs: @SuppressWarnings("unchecked")
    public T get(double coord) {
      if(coord == Double.NEGATIVE_INFINITY) {
        return getSpecial(0);
      }
      if(coord == Double.POSITIVE_INFINITY) {
        return getSpecial(1);
      }
      if(Double.isNaN(coord)) {
        return getSpecial(2);
      }
      int bin = getBinNr(coord);
      if(bin < 0) {
        if(size - bin > data.length) {
          // Reallocate. TODO: use an arraylist-like grow strategy!
          Object[] tmpdata = new Object[growSize(data.length, size - bin)];
          System.arraycopy(data, 0, tmpdata, -bin, size);
          data = tmpdata;
        }
        else {
          // Shift in place
          System.arraycopy(data, 0, data, -bin, size);
        }
        for(int i = 0; i < -bin; i++) {
          data[i] = supplier.make();
        }
        // Note that bin is negative, -bin is the shift offset!
        offset -= bin;
        size -= bin;
        // TODO: modCounter++; and have iterators fast-fail
        // Unset max value when resizing
        max = Double.MAX_VALUE;
        return (T) data[0];
      }
      else if(bin >= size) {
        if(bin >= data.length) {
          Object[] tmpdata = new Object[growSize(data.length, bin + 1)];
          System.arraycopy(data, 0, tmpdata, 0, size);
          data = tmpdata;
        }
        for(int i = size; i <= bin; i++) {
          data[i] = supplier.make();
        }
        size = bin + 1;
        // TODO: modCounter++; and have iterators fast-fail
        // Unset max value when resizing
        max = Double.MAX_VALUE;
        return (T) data[bin];
      }
      else {
        return (T) data[bin];
      }
    }