public final class Problem extends Object
Constructor and Description |
---|
Problem(boolean fatal,
String message)
Creates new instance of Problem class.
|
Problem(boolean fatal,
String message,
ProblemDetails details)
Creates new instance of Problem class.
|
Modifier and Type | Method and Description |
---|---|
ProblemDetails |
getDetails()
Getter for ProblemDetails
|
String |
getMessage()
Returns textual description of the problem.
|
Problem |
getNext()
Returns the following problem (or
null if there none). |
boolean |
isFatal()
Indicates whether the problem is fatal.
|
void |
setNext(Problem next)
Sets the following problem.
|
public Problem(boolean fatal, @NonNull String message)
fatal
- Indicates whether the problem is fatal.message
- Textual description of the problem.public Problem(boolean fatal, @NonNull String message, ProblemDetails details)
fatal
- Indicates whether the problem is fatal.message
- Textual description of the problem.details
- Problem detailsProblemDetails
public boolean isFatal()
true
if the problem is fatal, otherwise returns false
.@NonNull public String getMessage()
@CheckForNull public Problem getNext()
null
if there none).public void setNext(@NonNull Problem next) throws IllegalStateException
next
- The following problem.IllegalStateException
- subsequent attempts to call this method will result in IllegalStateException.@CheckForNull public ProblemDetails getDetails()