public class AddIndexStrategy extends Object implements OnDuplicateFormFieldNameStrategy
OnDuplicateFormFieldNameStrategy implementation that adds an index to the field name of the second field| Constructor and Description |
|---|
AddIndexStrategy()
Creates a new
AddIndexStrategy instance. |
AddIndexStrategy(String separator)
Creates a new
AddIndexStrategy instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(PdfFormField firstField,
PdfFormField secondField,
boolean throwExceptionOnError)
Renames the second field by adding an index to its name.
|
public AddIndexStrategy(String separator)
AddIndexStrategy instance.separator - the separator that will be used to separate the original field name and the indexpublic AddIndexStrategy()
AddIndexStrategy instance.
The default separator will be used to separate the original field name and the index.
the default separator is public boolean execute(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError)
execute in interface OnDuplicateFormFieldNameStrategyfirstField - the first fieldsecondField - the second fieldthrowExceptionOnError - if true, an exception will be thrownCopyright © 1998–2024 Apryse Group NV. All rights reserved.