Package com.marcpg.libpg.formular
Class FormularResult
java.lang.Object
com.marcpg.libpg.formular.FormularResult
Represents a fully filled out formular's result with all values.
Also provides records for the different question type's answers.
Note that most features will require you to manually implement the JNA dependency (>5.14.0)!
Note that most features will require you to manually implement the JNA dependency (>5.14.0)!
- Since:
- 0.0.8
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Represents a result of aBooleanQuestion
.static final record
Represents a result of aCheckboxesQuestion
.static final record
Represents a result of aIntegerQuestion
.static final record
Represents a result of aMultipleChoiceQuestion
.static interface
All results should extend this.static final record
Represents a result of aTextQuestion
. -
Field Summary
Modifier and TypeFieldDescriptionfinal List<FormularResult.Result>
A list of all results of this formular result. -
Constructor Summary
ConstructorDescriptionFormularResult
(FormularResult.Result... results) Creates a new formular result with all the results.FormularResult
(List<FormularResult.Result> results) Creates a new formular result with a list of the results. -
Method Summary
Modifier and TypeMethodDescriptionaddResult
(FormularResult.Result result) Adds a result to this formular result.Clears all results from this formular result.removeResult
(FormularResult.Result result) Removes a result from this formular result.Converts the results to an iterator that can be used to go through all of them.
-
Field Details
-
results
A list of all results of this formular result.
-
-
Constructor Details
-
FormularResult
Creates a new formular result with a list of the results.- Parameters:
results
- The list of all results.
-
FormularResult
Creates a new formular result with all the results.- Parameters:
results
- All results.
-
-
Method Details
-
addResult
Adds a result to this formular result.- Parameters:
result
- The result to add.- Returns:
- A reference to this object.
-
removeResult
Removes a result from this formular result.- Parameters:
result
- The result to remove.- Returns:
- A reference to this object.
-
clearResults
Clears all results from this formular result.- Returns:
- A reference to this object.
-
toIterator
Converts the results to an iterator that can be used to go through all of them.- Returns:
- The converted iterator.
-