- /**
- * Moves the given field up one position in the field list. The index of the
- * field to move must be greater than {@code 0} (because you obviously can
- * not move the first field further up).
- *
- * @param field
- * The field to move up
- */
+ public void setField(Field field, String newValue) {
+ int indexOfField = getFieldIndex(field);
+ if (indexOfField == -1) {
+ return;
+ }
+ fields.set(indexOfField, new Field(field.getId(), field.getName(), newValue));
+ }
+