public class TemplateCollection extends Object implements Iterable<Template>
Templates used by automatic template selection.
Pass an instance to Parser.parseByTemplate(TemplateCollection, com.groupdocs.parser.options.ParseByTemplateOptions)
and the parser will choose the best-matching template for the document being parsed.
| Constructor and Description |
|---|
TemplateCollection()
Initializes a new empty instance of the
TemplateCollection class. |
TemplateCollection(Iterable<? extends Template> templates)
Initializes a new instance of the
TemplateCollection class populated with the given templates. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Template template)
Adds a template to the collection.
|
void |
clear()
Clears the collection.
|
Template |
get(int index)
Gets the template at the given index.
|
int |
getCount()
Gets the number of templates in the collection.
|
Iterator<Template> |
iterator() |
void |
removeAt(int index)
Removes the template at the given index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic TemplateCollection()
TemplateCollection class.public TemplateCollection(Iterable<? extends Template> templates)
TemplateCollection class populated with the given templates.templates - The templates to seed the collection with.public void add(Template template)
template - The template to add.public void removeAt(int index)
index - The zero-based index.public void clear()
public Template get(int index)
index - The zero-based index.public int getCount()
Copyright © 2026. All rights reserved.