Constructor and Description |
---|
Problem(java.lang.String message,
Severity severity)
Create a new problem with the given message and severity
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Problem o)
Compare, such that most severe Problems will appear first, least last
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getMessage()
Get the localized, human-readable description of the problem
|
int |
hashCode() |
boolean |
isFatal()
Convenience method to determine if this problem is of Severity.FATAL
severity
|
Severity |
severity()
Get the
Severity of this Problem. |
java.lang.String |
toString() |
static Problem |
worst(Problem p1,
Problem p2)
Determine which Problem is more severe.
|
public Problem(java.lang.String message, Severity severity)
message
- A localized, human readable messageseverity
- The severitypublic Severity severity()
Severity
of this Problem. The severity indicates whether
the user should be blocked from further action until the problem
is corrected, or if continuing with a warning is reasonable.
It also determines the warning icon which can be displayed to the
user.public static Problem worst(Problem p1, Problem p2)
p1
- p2 the two Problems to compare. Any of them (or both) may be null.public boolean isFatal()
public java.lang.String getMessage()
public int compareTo(Problem o)
compareTo
in interface java.lang.Comparable<Problem>
o
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object