Class Problems
java.lang.Object
org.netbeans.validation.api.Problems
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidDeprecated.use append() insteadfinal voidDeprecated.use append() insteadfinal voidDeprecated.use append() insteadfinal ProblemsMerge a set of problems into this oneGet the entire set of problems, sorted by severity first, order of addition second.final ProblemsConvenience method to add a problem with the specified message and Severity.FATALfinal ProblemsAdd a problem with the specified severityfinal ProblemsAdd a problemstatic ProblemsCreate a Problems which contains the localized message belonging to the passed class and key, according to the lookup semantics of Localizer.static ProblemsCreate a new Problems with the initial (fatal) problem.final ProblemGet theProblemwith the highest severity.final booleanhasFatal()Determine if this set of problems includes any that are fatal.iterator()final voidDeprecated.Use addAll insteadvoidvoidtoString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
Problems
public Problems()
-
-
Method Details
-
add
Deprecated.use append() insteadConvenience method to add a problem with the specified message and Severity.FATAL- Parameters:
problem-
-
add
Deprecated.use append() insteadAdd a problem with the specified severity- Parameters:
problem- the messageseverity- the severity
-
add
Deprecated.use append() insteadAdd a problem- Parameters:
problem- The problem (may be null)
-
append
-
append
-
append
-
addAll
-
putAll
Deprecated.Use addAll insteadDump all problems in another instance of Problems into this one.- Parameters:
problems- The other problems.
-
hasFatal
public final boolean hasFatal()Determine if this set of problems includes any that are fatal.- Returns:
- true if a fatal problem has been encountered
-
create
-
create
Create a Problems which contains the localized message belonging to the passed class and key, according to the lookup semantics of Localizer.- Parameters:
localizerClass- A class which (or whose package) has an associated resource bundlebundleKey- The key in that bundle- Returns:
- a Problems with a single fatal problem in it
-
getLeadProblem
Get theProblemwith the highest severity. If there is more than one problem with equal severity, the one first added will be considered more severe.- Returns:
- The most severe
Problemin this set
-
allProblems
-
toString
-
throwIfFatalPresent
-
throwIfFatalPresent
public void throwIfFatalPresent() -
iterator
-