public final class DocumentFieldAndValue extends Object
DocumentField together with its value.
Usually this class is not needed when working with DocumentFields, except when used with a
SequenceAnnotationGenerator.AnnotationGeneratorResult
which allows an annotation generator to assign field values to a document.
If you are not using an annotation generator, and are wanting to set a field value on a document, use
AnnotatedPluginDocument.setFieldValue(DocumentField, Object)
or if you are wanting to provide a field and value from a PluginDocument implementation
use PluginDocument.getDisplayableFields() and PluginDocument.getFieldValue(String)| Constructor and Description |
|---|
DocumentFieldAndValue(DocumentField field,
Object value)
Construct a
DocumentField together with its value. |
public DocumentFieldAndValue(DocumentField field, Object value)
DocumentField together with its value.field - the fieldvalue - a value which must be either null or of the type defined in the field's DocumentField.getValueType().IllegalArgumentException - if the value is not of the correct type defined by the field.public DocumentField getField()
getValue(). Will not be null.public Object getValue()
getField().getValueType().