Interface CellValue
- All Superinterfaces:
Serializable,ValueExtractor
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder for creating an instance ofCellValue. -
Method Summary
Modifier and TypeMethodDescriptionAssertions that must all return an instance ofAssertionSuccessfor a value to be extracted.static CellValue.Builderbuilder()Create aCellValue.Builderfor constructing an instance of this class.default StringextractValue(ValueExtractorParameters parameters) location()Location of the cell to extract a value from.default booleanSetting that controls whetherextractValue(ValueExtractorParameters)should return null instead of raising an error if one of theassertions()returns an instance ofAssertionFailure.
-
Method Details
-
location
Location location()Location of the cell to extract a value from. -
assertions
List<CellAssertion> assertions()Assertions that must all return an instance ofAssertionSuccessfor a value to be extracted. This list can be empty. -
returnNullOnAssertionFailure
@Default default boolean returnNullOnAssertionFailure()Setting that controls whetherextractValue(ValueExtractorParameters)should return null instead of raising an error if one of theassertions()returns an instance ofAssertionFailure. Default value is false, so a failed assertion will result in an error captured in theParseResult.errorDataframe()and no rows from the file included in theParseResult.dataframeForKey(String)for theFormParser. -
builder
Create aCellValue.Builderfor constructing an instance of this class. -
extractValue
@Nullable default String extractValue(ValueExtractorParameters parameters) throws AssertionFailureException - Specified by:
extractValuein interfaceValueExtractor- Throws:
AssertionFailureException
-