Class FormCollectorImpl
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.reader.FormCollectorImpl
- All Implemented Interfaces:
FormCollector
Collects and manages form during parsing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsForm(String id) getOrCreateForm(String id, Consumer<FormImpl> afterCreateConsumer) voidremoveForm(String id) remove a form with a specific id from the collectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.form.impl.form2.reader.FormCollector
getOrCreateForm
-
Constructor Details
-
FormCollectorImpl
public FormCollectorImpl()
-
-
Method Details
-
getOrCreateForm
- Specified by:
getOrCreateFormin interfaceFormCollector- Parameters:
id- the id of the formafterCreateConsumer- consumer that runs on the form after it is created- Returns:
- the form with the given id - create it if it doesn't exist yet
-
removeForm
Description copied from interface:FormCollectorremove a form with a specific id from the collector- Specified by:
removeFormin interfaceFormCollector
-
containsForm
- Specified by:
containsFormin interfaceFormCollector- Returns:
- true if a form with the given id exists
-
getAllForms
- Specified by:
getAllFormsin interfaceFormCollector- Returns:
- all forms
-