Interface IErrorList

    • Method Detail

      • hasNoEntryForField

        default boolean hasNoEntryForField​(@Nullable
                                           String sSearchFieldName)
        Check if no entry for the specified field is present
        Parameters:
        sSearchFieldName - The field name to search.
        Returns:
        true if no entry for the specified field is present
      • hasNoEntryForFields

        default boolean hasNoEntryForFields​(@Nullable
                                            String... aSearchFieldNames)
        Check if no entry for the specified fields are present
        Parameters:
        aSearchFieldNames - The field names to search.
        Returns:
        true if no entry for any of the specified fields is present
      • hasEntryForField

        default boolean hasEntryForField​(@Nullable
                                         String sSearchFieldName)
        Check if any entry for the specified field is present
        Parameters:
        sSearchFieldName - The field name to search.
        Returns:
        true if an entry for the specified field is present
      • hasEntryForField

        default boolean hasEntryForField​(@Nullable
                                         String sSearchFieldName,
                                         @Nullable
                                         IErrorLevel aErrorLevel)
        Check if any entry for the specified field and the specified error level is present
        Parameters:
        sSearchFieldName - The field name to search.
        aErrorLevel - The exact form error level to search. May not be null
        Returns:
        true if an entry for the specified field is present that has exactly the specified form error level
      • hasErrorForField

        default boolean hasErrorForField​(@Nullable
                                         String sSearchFieldName)
        Check if any error entry for the specified field is present
        Parameters:
        sSearchFieldName - The field name to search.
        Returns:
        true if an error entry for the specified field is present
      • hasEntryForFields

        default boolean hasEntryForFields​(@Nullable
                                          String... aSearchFieldNames)
        Check if any entry for the specified fields are present
        Parameters:
        aSearchFieldNames - The field names to search.
        Returns:
        true if an entry for at least one of the specified fields is present
      • getListOfFields

        @Nonnull
        @ReturnsMutableCopy
        default IErrorList getListOfFields​(@Nullable
                                           String... aSearchFieldNames)
        Get a sub-list with all entries for the specified field names
        Parameters:
        aSearchFieldNames - The field names to search.
        Returns:
        Never null.
      • getListOfFieldsStartingWith

        @Nonnull
        @ReturnsMutableCopy
        default IErrorList getListOfFieldsStartingWith​(@Nullable
                                                       String... aSearchFieldNames)
        Get a sub-list with all entries that have field names starting with one of the supplied names.
        Parameters:
        aSearchFieldNames - The field names to search.
        Returns:
        Never null.
      • getListOfFieldsRegExp

        @Nonnull
        @ReturnsMutableCopy
        default IErrorList getListOfFieldsRegExp​(@Nonnull @Nonempty @RegEx
                                                 String sRegExp)
        Get a sub-list with all entries that have field names matching the passed regular expression.
        Parameters:
        sRegExp - The regular expression to compare the entries against.
        Returns:
        Never null.
      • getListWithoutField

        @Nonnull
        @ReturnsMutableCopy
        default IErrorList getListWithoutField()
        Get a sub-list with all entries that does not contain an error field name.
        Returns:
        Never null.
      • getAllFailures

        @Nonnull
        default IErrorList getAllFailures()
        Get a resource error group containing only the failure elements. All error levels except EErrorLevel.SUCCESS are considered to be a failure!
        Returns:
        A non-null error list containing only the failures.
      • getAllErrors

        @Nonnull
        default IErrorList getAllErrors()
        Get a resource error group containing only the error elements. All error levels ≥ EErrorLevel.ERROR are considered to be an error!
        Returns:
        A non-null error list containing only the errors.
      • getAllDataItems

        @Nonnull
        @ReturnsMutableCopy
        default <T> ICommonsList<T> getAllDataItems​(@Nonnull
                                                    Function<? super IError,​? extends T> aExtractor)
        Get a list with only a single data element.
        Type Parameters:
        T - Type to extract from IError.
        Parameters:
        aExtractor - The data extractor to be used. May not be null.
        Returns:
        Never null.