javagen.writeMap Maven / Gradle / Ivy
The newest version!
_oprot.writeMapBegin(new TMap(TType.{{keyConstType}}, TType.{{valueConstType}}, {{name}}.size()));
for (Map.Entry<{{keyType}}, {{valueType}}> _{{name}}_entry : {{name}}.entrySet()) {
{{keyType}} {{keyName}} = _{{name}}_entry.getKey();
{{#keyReadWriteInfo}}
{{>writeValue}}
{{/keyReadWriteInfo}}
{{valueType}} {{valueName}} = _{{name}}_entry.getValue();
{{#valueReadWriteInfo}}
{{>writeValue}}
{{/valueReadWriteInfo}}
}
_oprot.writeMapEnd();