Package ai.pipestream.common.validation
Class EmptyValidationResult
java.lang.Object
ai.pipestream.common.validation.EmptyValidationResult
- All Implemented Interfaces:
ValidationResult
An empty/no-op implementation of ValidationResult for testing and mocking purposes.
Always returns success with no errors or warnings.
-
Method Summary
Modifier and TypeMethodDescriptioncombine(ValidationResult other) Combines this result with another, taking the most restrictive validity.errors()Returns the list of validation errors.booleanReturns true if there are any errors.booleanReturns true if there are any issues (errors or warnings).booleanReturns true if there are any warnings.static EmptyValidationResultinstance()Get the singleton instance of EmptyValidationResult.toString()booleanvalid()Returns whether the validation was successful.warnings()Returns the list of validation warnings.
-
Method Details
-
instance
Get the singleton instance of EmptyValidationResult.- Returns:
- the singleton instance of EmptyValidationResult
-
valid
public boolean valid()Description copied from interface:ValidationResultReturns whether the validation was successful.- Specified by:
validin interfaceValidationResult- Returns:
- true if valid, false otherwise
-
errors
Description copied from interface:ValidationResultReturns the list of validation errors.- Specified by:
errorsin interfaceValidationResult- Returns:
- list of error messages
-
warnings
Description copied from interface:ValidationResultReturns the list of validation warnings.- Specified by:
warningsin interfaceValidationResult- Returns:
- list of warning messages
-
combine
Description copied from interface:ValidationResultCombines this result with another, taking the most restrictive validity. Accumulates all errors and warnings from both results.- Specified by:
combinein interfaceValidationResult- Parameters:
other- the other validation result to combine with- Returns:
- a new combined validation result
-
hasIssues
public boolean hasIssues()Description copied from interface:ValidationResultReturns true if there are any issues (errors or warnings).- Specified by:
hasIssuesin interfaceValidationResult- Returns:
- true if there are any issues
-
hasErrors
public boolean hasErrors()Description copied from interface:ValidationResultReturns true if there are any errors.- Specified by:
hasErrorsin interfaceValidationResult- Returns:
- true if there are any errors
-
hasWarnings
public boolean hasWarnings()Description copied from interface:ValidationResultReturns true if there are any warnings.- Specified by:
hasWarningsin interfaceValidationResult- Returns:
- true if there are any warnings
-
toString
-