text: public long ramBytesUsed() {long sizeInBytes = BASE_RAM_BYTES_USED;sizeInBytes += (docIDs!=null)? RamUsageEstimator.sizeOf(docIDs) : 0;sizeInBytes += (freqs!=null)? RamUsageEstimator.sizeOf(freqs) : 0;if(positions != null) {sizeInBytes += RamUsageEstimator.shallowSizeOf(positions);for(int[] position : positions) {sizeInBytes += (position!=null) ? RamUsageEstimator.sizeOf(position) : 0;}}if (payloads != null) {sizeInBytes += RamUsageEstimator.shallowSizeOf(payloads);for(byte[][] payload : payloads) {if(payload != null) {sizeInBytes += RamUsageEstimator.shallowSizeOf(payload);for(byte[] pload : payload) {sizeInBytes += (pload!=null) ? RamUsageEstimator.sizeOf(pload) : 0;}}}}return sizeInBytes;}