} else {
setName(className); // we have already read the class name in VectorWritable
}
size = dataInput.readInt();
int cardinality = dataInput.readInt();
OpenIntDoubleHashMap values = new OpenIntDoubleHashMap(cardinality);
int i = 0;
while (i < cardinality) {
int index = dataInput.readInt();
double value = dataInput.readDouble();
values.put(index, value);
i++;
}
assert (i == cardinality);
this.values = values;
}