Interface ErrorsContext

All Superinterfaces:
Iterable<ConversionError>
All Known Subinterfaces:
ArgumentConversionContext<T>, ConversionContext, ImmutableArgumentConversionContext<T>

public interface ErrorsContext extends Iterable<ConversionError>
Interface for reporting conversion errors.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • reject

      default void reject(Exception exception)
      Reject the version with the given exception.
      Parameters:
      exception - The exception
    • reject

      default void reject(Object value, Exception exception)
      Reject the version with the given exception.
      Parameters:
      value - The original value
      exception - The exception
    • iterator

      default Iterator<ConversionError> iterator()
      Specified by:
      iterator in interface Iterable<ConversionError>
    • getLastError

      default Optional<ConversionError> getLastError()
      Obtain the last error.
      Returns:
      The error
    • hasErrors

      default boolean hasErrors()
      Returns:
      Check whether errors exist