org.apache.pdfbox.preflight

## Class ValidationResult.ValidationError

- java.lang.Object
- - org.apache.pdfbox.preflight.ValidationResult.ValidationError

Enclosing class:
  ValidationResult

    public static class ValidationResult.ValidationError
    extends Object

This Class represents an error of validation. It contains an error code and an error explanation.

### Constructor Summary

Constructors
Constructor and Description
`ValidationError(String errorCode)` Create a validation error with the given error code
`ValidationError(String errorCode, String details)` Create a validation error with the given error code and the error explanation.
`ValidationError(String errorCode, String details, Throwable cause)` Create a validation error with the given error code and the error explanation.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object o)`
`Throwable` `getCause()` Get the underlying cause if the ValidationError was caused by a Throwable.
`String` `getDetails()`
`String` `getErrorCode()`
`Integer` `getPageNumber()` Returns the page number, or null if not known.
`Throwable` `getThrowable()` Get the place where the ValidationError was created, useful if the ValidationError was not caused by a Throwable.
`int` `hashCode()`
`boolean` `isWarning()`
`void` `setDetails(String details)` Set the error explanation
`void` `setPageNumber(Integer pageNumber)` Sets or resets the page number.
`void` `setWarning(boolean isWarning)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ValidationError

    public ValidationError(String errorCode)

Create a validation error with the given error code

Parameters:
  `errorCode` -

#### ValidationError

    public ValidationError(String errorCode,
                           String details,
                           Throwable cause)

Create a validation error with the given error code and the error explanation.

Parameters:
  `errorCode` - the error code
  `details` - the error explanation
  `cause` - the error cause

#### ValidationError

    public ValidationError(String errorCode,
                           String details)

Create a validation error with the given error code and the error explanation.

Parameters:
  `errorCode` - the error code
  `details` - the error explanation

### Method Detail

#### getThrowable

    public Throwable getThrowable()

Get the place where the ValidationError was created, useful if the ValidationError was not caused by a Throwable.

Returns:
  The place where the ValidationError was created.

#### getCause

    public Throwable getCause()

Get the underlying cause if the ValidationError was caused by a Throwable.

Returns:
  The underlying cause if the ValidationError was caused by a Throwable, or null if not.

#### getPageNumber

    public Integer getPageNumber()

Returns the page number, or null if not known.

#### setPageNumber

    public void setPageNumber(Integer pageNumber)

Sets or resets the page number.

Parameters:
  `pageNumber` - zero based page number or null if none is known.

#### getErrorCode

    public String getErrorCode()

Returns:
  the error code

#### getDetails

    public String getDetails()

Returns:
  the error explanation

#### setDetails

    public void setDetails(String details)

Set the error explanation

Parameters:
  `details` -

#### isWarning

    public boolean isWarning()

#### setWarning

    public void setWarning(boolean isWarning)

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`