public class MultifieldDocument extends Document
Constructor and Description |
---|
MultifieldDocument()
Constructs a new document with no fields.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(Field field)
Adds a field to a document.
|
String |
getContent()
Gets the content of the document, appending the content of the different
fields belonging to it.
|
Field |
getField(String name)
Returns the field with the given name if exists in this document, or
null.
|
Iterator<Field> |
getFields()
Returns an iterator over the fields being part of this document.
|
void |
removeField(String name)
Removes field with the specified name from the document.
|
public MultifieldDocument()
public Field getField(String name)
public Iterator<Field> getFields()
public void addField(Field field)
public void removeField(String name)
removeField
in class Document
name
- The name of the field to remove from the document's fieldspublic String getContent()
getContent
in class Document
Copyright © 2013. All rights reserved.