public ExtendedCell toCell() {
      ExtendedCell ret;
      int cellBufSize = getCellBufSize();
      long seqId = 0L;
      if (includesMvcc()) {
        seqId = memstoreTS;
      }
      if (currentBuffer.hasArray()) {
        // TODO : reduce the varieties of KV here. Check if based on a boolean
        // we can handle the 'no tags' case.
        if (tagsLength > 0) {
          // TODO : getRow len here.
          ret = new SizeCachedKeyValue(currentBuffer.array(),
            currentBuffer.arrayOffset() + startOffset, cellBufSize, seqId, keyLength);
        } else {
          ret = new SizeCachedNoTagsKeyValue(currentBuffer.array(),
            currentBuffer.arrayOffset() + startOffset, cellBufSize, seqId, keyLength);
        }
      } else {
        currentBuffer.asSubByteBuffer(startOffset, cellBufSize, tmpPair);
        ByteBuffer buf = tmpPair.getFirst();
        if (buf.isDirect()) {
          // TODO : getRow len here.
          ret = tagsLength > 0
            ? new SizeCachedByteBufferKeyValue(buf, tmpPair.getSecond(), cellBufSize, seqId,
              keyLength)
            : new SizeCachedNoTagsByteBufferKeyValue(buf, tmpPair.getSecond(), cellBufSize, seqId,
              keyLength);
        } else {
          if (tagsLength > 0) {
            ret = new SizeCachedKeyValue(buf.array(), buf.arrayOffset() + tmpPair.getSecond(),
              cellBufSize, seqId, keyLength);
          } else {
            ret = new SizeCachedNoTagsKeyValue(buf.array(), buf.arrayOffset() + tmpPair.getSecond(),
              cellBufSize, seqId, keyLength);
          }
        }
      }
      return ret;
    }
Copy the state from the next one into this instance (the previous state placeholder). Used to
save the previous state when we are advancing the seeker to the next key/value.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/RowIndexSeekerV1.java