Class FlowValidationProblemList

    • Constructor Detail

      • FlowValidationProblemList

        public FlowValidationProblemList()

        Create a new empty validation problem list.

      • FlowValidationProblemList

        public FlowValidationProblemList​(FlowValidationProblemList problemList)

        Create a new validation problem list from the specified one.

        Parameters:
        problemList - problem list source, null if none
    • Method Detail

      • hasErrors

        public boolean hasErrors()

        Return true if this problem list contains errors, false otherwise.

        Returns:
        true if there are errors, false otherwise
      • hasWarnings

        public boolean hasWarnings()

        Return true if this problem list contains warnings, false otherwise.

        Returns:
        true if there are warnings, false otherwise
      • getErrorCount

        public int getErrorCount()

        Return this problem list's error count.

        Returns:
        error count
      • getWarningCount

        public int getWarningCount()

        Return this problem list's warning count.

        Returns:
        warning count
      • getErrors

        public List<FlowValidationProblem> getErrors()

        Return a copy of this problem list's errors.

        Returns:
        error list
      • getError

        public FlowValidationProblem getError​(int n)

        Return the Nth error.

        Parameters:
        n - index
        Returns:
        error
      • getWarnings

        public List<FlowValidationProblem> getWarnings()

        Return a copy of this problem list's warnings.

        Returns:
        warning list
      • getWarning

        public FlowValidationProblem getWarning​(int n)

        Return the Nth warning.

        Parameters:
        n - index
        Returns:
        warning
      • getFormattedProblems

        public List<String> getFormattedProblems()

        Return a list of formatted problems as strings.

        Returns:
        formatted problem list
      • getFormattedErrors

        public List<String> getFormattedErrors()

        Return a list of formatted errors as strings.

        Returns:
        formatted error list
      • getFormattedWarnings

        public List<String> getFormattedWarnings()

        Return a list of formatted warnings as strings.

        Returns:
        formatted warning list
      • getProblemsAsString

        public String getProblemsAsString()

        Return this list's problems as a comma-separated list.

        Returns:
        the problems
      • getProblemsAsString

        public String getProblemsAsString​(String prefix,
                                          String separator,
                                          String suffix)

        Return this list's problems as a list with specified prefix, separator, and suffix sequences.

        Parameters:
        prefix - prefix sequence
        separator - separator sequence
        suffix - suffix sequence
        Returns:
        the problems
      • getErrorsAsString

        public String getErrorsAsString()

        Return this list's errors as a comma-separated list.

        Returns:
        the errors
      • getErrorsAsString

        public String getErrorsAsString​(String prefix,
                                        String separator,
                                        String suffix)

        Return this list's errors as a list with specified prefix, separator, and suffix sequences.

        Parameters:
        prefix - prefix sequence
        separator - separator sequence
        suffix - suffix sequence
        Returns:
        the errors
      • getWarningsAsString

        public String getWarningsAsString()

        Return this list's warnings as a comma-separated list.

        Returns:
        the warnings
      • getWarningsAsString

        public String getWarningsAsString​(String prefix,
                                          String separator,
                                          String suffix)

        Return this list's warnings as a list with specified prefix, separator, and suffix sequences.

        Parameters:
        prefix - prefix sequence
        separator - separator sequence
        suffix - suffix sequence
        Returns:
        the warnings
      • toException

        public FlowValidationProblemList.FlowValidationException toException()

        Return an exception containing all problems as a single long string, each separated by a newline. If the list is empty, throw an illegal argument exception.

        Returns:
        result converted to an exception
      • toString

        public String toString()

        Return the list in string form.

        Overrides:
        toString in class Object
        Returns:
        string form
      • addAll

        public boolean addAll​(Collection<? extends FlowValidationProblem> c)

        Add all of the problems in the specified collection to this list. If the specified collection is null, do nothing.

        Specified by:
        addAll in interface Collection<FlowValidationProblem>
        Parameters:
        c - collection containing elements to be added to this list
        Returns:
        true if this list changed as a result of the call
      • containsAll

        public boolean containsAll​(Collection<?> c)

        Return true if this collection contains all of the elements in the specified collection.

        Specified by:
        containsAll in interface Collection<FlowValidationProblem>
        Parameters:
        c - collection to be checked for containment in this collection
        Returns:
        true if this collection contains all of the elements in the specified collection
      • contains

        public boolean contains​(Object o)

        Return true if this collection contains the specified element.

        Specified by:
        contains in interface Collection<FlowValidationProblem>
        Parameters:
        o - element whose presence in this collection is to be tested
        Returns:
        true if this collection contains the specified element
      • isEmpty

        public boolean isEmpty()

        Return true if this collection contains no elements.

        Specified by:
        isEmpty in interface Collection<FlowValidationProblem>
        Returns:
        true if this collection contains no elements
      • toArray

        public Object[] toArray()

        Return an array containing all of the elements in this list in order.

        Specified by:
        toArray in interface Collection<FlowValidationProblem>
        Returns:
        an array containing all of the elements in this collection
      • toArray

        public <ValidationProblem> ValidationProblem[] toArray​(ValidationProblem[] a)

        Return an array containing all of the elements in this list in order. The runtime type of the returned array is that of the specified array.

        Specified by:
        toArray in interface Collection<FlowValidationProblem>
        Parameters:
        a - the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
        Returns:
        an array containing all of the elements in this collection
      • equals

        public boolean equals​(Object o)

        Return true if the specified list is equal to this list, false otherwise. Two lists are equal if their types and contents are equal.

        Specified by:
        equals in interface Collection<FlowValidationProblem>
        Overrides:
        equals in class Object
        Parameters:
        o - object to compare to
        Returns:
        true if equals, false otherwise
      • hashCode

        public int hashCode()
        Returns the hash code value for this collection. The hash code is the XOR of the hash codes of the list members.
        Specified by:
        hashCode in interface Collection<FlowValidationProblem>
        Overrides:
        hashCode in class Object
        Returns:
        hash code