FormFieldCollection

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public final class FormFieldCollection implements Iterable<IFormField>

Represents a collection of form fields.

Constructors

Constructor Description
FormFieldCollection() Initializes a new instance of the FormFieldCollection class.

Methods

Method Description
iterator() Returns an enumerator that iterates through the collection.
insert(IFormField field) Inserts a form field into the collection.
get(String name) Gets the form field with the specified name.
getFormField(String name, Class type) Gets the form field with the specified name and type.

FormFieldCollection()

public FormFieldCollection()

Initializes a new instance of the FormFieldCollection class.

iterator()

public Iterator<IFormField> iterator()

Returns an enumerator that iterates through the collection.

Returns: java.util.Iterator<com.groupdocs.editor.words.fieldmanagement.IFormField> - An enumerator that can be used to iterate through the collection.

insert(IFormField field)

public void insert(IFormField field)

Inserts a form field into the collection.

Parameters:

Parameter Type Description
field IFormField The form field to insert.

get(String name)

public IFormField get(String name)

Gets the form field with the specified name.

Parameters:

Parameter Type Description
name java.lang.String The name of the form field.

Returns: IFormField - The form field with the specified name, if found; otherwise, null .

getFormField(String name, Class type)

public T <T>getFormField(String name, Class<T> type)

Gets the form field with the specified name and type.

Parameters:

Parameter Type Description
name java.lang.String The name of the form field.

T : The type of the form field. | | type | java.lang.Class | |

Returns: T - The form field with the specified name and type, if found; otherwise, the default value for the type.