Interface CellValue
- All Superinterfaces:
Serializable
,ValueExtractor
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Builder for creating an instance ofCellValue
. -
Method Summary
Modifier and TypeMethodDescriptionAssertions that must all return an instance ofAssertionSuccess
for a value to be extracted.static CellValue.Builder
builder()
Create aCellValue.Builder
for constructing an instance of this class.default String
extractValue
(ValueExtractorParameters parameters) location()
Location of the cell to extract a value from.default boolean
Setting 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 ofAssertionSuccess
for 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.Builder
for constructing an instance of this class. -
extractValue
@Nullable default String extractValue(ValueExtractorParameters parameters) throws AssertionFailureException - Specified by:
extractValue
in interfaceValueExtractor
- Throws:
AssertionFailureException
-