}
@Override
public GenericContainer get() {
if (readyToBinary) {
GenericRecordBuilder builder = new GenericRecordBuilder(schema);
Set<String> keys = fields.keySet();
for (String key : keys) {
INamedValue<String, GenericContainer> item = fields.get(key);
GenericContainer val = item.get();
// TODO Improv. I dislike this NULL verification
if (val != null)
builder.set(item.name(), val);
}
return builder.build();
} else {
GenericRecord record = new GenericData.Record (schema);
Set<String> keys = fields.keySet();
for (String key : keys) {