public long ramBytesUsed() {long ramBytesUsed = BASE_RAM_BYTES_USED;ramBytesUsed += fields.size() * 2L * RamUsageEstimator.NUM_BYTES_OBJECT_REF;ramBytesUsed += formats.size() * 2L * RamUsageEstimator.NUM_BYTES_OBJECT_REF;for(Map.Entry<String,FieldsProducer> entry: formats.entrySet()) {ramBytesUsed += entry.getValue().ramBytesUsed();}return ramBytesUsed;}
public override long RamBytesUsed(){long size = 0;foreach (KeyValuePair<string, DocValuesProducer> entry in formats){size += (entry.Key.Length * RamUsageEstimator.NUM_BYTES_CHAR)+ entry.Value.RamBytesUsed();}return size;}