code: public void add(float datum) {
          sorted = false;
          if (n < k) {
              heap[n++] = datum;
              if (n == k) {
                  heapify(heap);
              }
          } else {
              n++;
              if (datum < heap[0]) {
                  heap[0] = datum;
                  SortUtils.siftDown(heap, 0, k-1);
              }
          }
      }
docs: Assimilate a new value from the stream.