Class EmptyValidationResult

java.lang.Object
ai.pipestream.common.validation.EmptyValidationResult
All Implemented Interfaces:
ValidationResult

public class EmptyValidationResult extends Object implements ValidationResult
An empty/no-op implementation of ValidationResult for testing and mocking purposes. Always returns success with no errors or warnings.
  • Method Details

    • instance

      public static EmptyValidationResult instance()
      Get the singleton instance of EmptyValidationResult.
      Returns:
      the singleton instance of EmptyValidationResult
    • valid

      public boolean valid()
      Description copied from interface: ValidationResult
      Returns whether the validation was successful.
      Specified by:
      valid in interface ValidationResult
      Returns:
      true if valid, false otherwise
    • errors

      public List<String> errors()
      Description copied from interface: ValidationResult
      Returns the list of validation errors.
      Specified by:
      errors in interface ValidationResult
      Returns:
      list of error messages
    • warnings

      public List<String> warnings()
      Description copied from interface: ValidationResult
      Returns the list of validation warnings.
      Specified by:
      warnings in interface ValidationResult
      Returns:
      list of warning messages
    • combine

      public ValidationResult combine(ValidationResult other)
      Description copied from interface: ValidationResult
      Combines this result with another, taking the most restrictive validity. Accumulates all errors and warnings from both results.
      Specified by:
      combine in interface ValidationResult
      Parameters:
      other - the other validation result to combine with
      Returns:
      a new combined validation result
    • hasIssues

      public boolean hasIssues()
      Description copied from interface: ValidationResult
      Returns true if there are any issues (errors or warnings).
      Specified by:
      hasIssues in interface ValidationResult
      Returns:
      true if there are any issues
    • hasErrors

      public boolean hasErrors()
      Description copied from interface: ValidationResult
      Returns true if there are any errors.
      Specified by:
      hasErrors in interface ValidationResult
      Returns:
      true if there are any errors
    • hasWarnings

      public boolean hasWarnings()
      Description copied from interface: ValidationResult
      Returns true if there are any warnings.
      Specified by:
      hasWarnings in interface ValidationResult
      Returns:
      true if there are any warnings
    • toString

      public String toString()
      Overrides:
      toString in class Object