Class SimpleFormErrors
java.lang.Object
com.atlassian.bitbucket.validation.SimpleFormErrors
- All Implemented Interfaces:
FormErrors
Simple implementation of
FormErrors as a plain Java object with a builder,-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Indicates whether this instance of errors is empty, or has any errors.
-
Method Details
-
getErrors
- Specified by:
getErrorsin interfaceFormErrors- Parameters:
field- that potentially contains some errors- Returns:
- the error in question or an empty collection
-
getFieldErrors
- Specified by:
getFieldErrorsin interfaceFormErrors- Returns:
- a map of fields to a collection of at least one associated error
-
getFormErrors
- Specified by:
getFormErrorsin interfaceFormErrors- Returns:
- a collection of errors on the form (ie not attached to a field)
-
isEmpty
public boolean isEmpty()Description copied from interface:FormErrorsIndicates whether this instance of errors is empty, or has any errors.- Specified by:
isEmptyin interfaceFormErrors- Returns:
true, if this instance ofFormErrorscontains no errors of any type,falseotherwise
-