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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isEmpty()
Indicates whether this instance of errors is empty, or has any errors.
-
Method Details
-
getErrors
- Specified by:
getErrors
in interfaceFormErrors
- Parameters:
field
- that potentially contains some errors- Returns:
- the error in question or an empty collection
-
getFieldErrors
- Specified by:
getFieldErrors
in interfaceFormErrors
- Returns:
- a map of fields to a collection of at least one associated error
-
getFormErrors
- Specified by:
getFormErrors
in interfaceFormErrors
- Returns:
- a collection of errors on the form (ie not attached to a field)
-
isEmpty
public boolean isEmpty()Description copied from interface:FormErrors
Indicates whether this instance of errors is empty, or has any errors.- Specified by:
isEmpty
in interfaceFormErrors
- Returns:
true
, if this instance ofFormErrors
contains no errors of any type,false
otherwise
-