fields.add(min(fieldIndex + 1, fields.size()), field);
}
- /**
- * Removes the given field.
- *
- * @param field
- * The field to remove
- */
public void removeField(Field field) {
checkNotNull(field, "field must not be null");
- checkArgument(hasField(field), "field must belong to this profile");
fields.remove(field);
}
}
hash.putString("ContactInformation(");
for (Field field : fields) {
- hash.putString(field.getName()).putString("(").putString(field.getValue()).putString(")");
+ if (field.getValue() != null) {
+ hash.putString(field.getName()).putString("(").putString(field.getValue()).putString(")");
+ }
}
hash.putString(")");
hash.putString(")");