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 TypeMethodDescriptionboolean
containsForm
(String id) getOrCreateForm
(String id, Consumer<FormImpl> afterCreateConsumer) void
removeForm
(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, wait
Methods inherited from interface ch.tocco.nice2.model.form.impl.form2.reader.FormCollector
getOrCreateForm
-
Constructor Details
-
FormCollectorImpl
public FormCollectorImpl()
-
-
Method Details
-
getOrCreateForm
- Specified by:
getOrCreateForm
in 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:FormCollector
remove a form with a specific id from the collector- Specified by:
removeForm
in interfaceFormCollector
-
containsForm
- Specified by:
containsForm
in interfaceFormCollector
- Returns:
- true if a form with the given id exists
-
getAllForms
- Specified by:
getAllForms
in interfaceFormCollector
- Returns:
- all forms
-