Class RenderedProblem
Returned from Messages.renderProblem(Problem, java.util.Locale)
to translate a problem while maintaining its
tree structure. This should allow UIs to present it appropriately without having to translate it all individually.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Used for customizing the output of toString -
Field Summary
Modifier and TypeFieldDescriptionfinal List<RenderedProblem>
A list of RenderedProblems for each child in sourcefinal int
The number of ancestors this problem hasfinal String
The translated message for the source problemfinal Problem
The thing that caused all the problems -
Constructor Summary
ConstructorDescriptionRenderedProblem
(String message, Problem source) RenderedProblem
(String message, Problem source, int indentLevel, List<RenderedProblem> children) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
A list of RenderedProblems for each child in sourceint
The number of ancestors this problem hasThe translated message for the source problemThe thing that caused all the problemsint
hashCode()
toList()
Convert this RenderedProblem in to a list, as per a depth-first search of this RenderedProblemtoString()
Returns a line separated, indented version of this problem and its childrentoString
(Consumer<RenderedProblem.ToStringOptions> customize) Returns a line separated, indented version of this problem and its childrentoString
(RenderedProblem.ToStringOptions options)
-
Field Details
-
message
The translated message for the source problem
-
source
The thing that caused all the problems
-
indentLevel
public final int indentLevelThe number of ancestors this problem has
-
children
A list of RenderedProblems for each child in source
-
-
Constructor Details
-
RenderedProblem
-
RenderedProblem
public RenderedProblem(String message, Problem source, int indentLevel, List<RenderedProblem> children)
-
-
Method Details
-
toList
Convert this RenderedProblem in to a list, as per a depth-first search of this RenderedProblem
- Returns:
-
toString
Returns a line separated, indented version of this problem and its children
-
toString
-
toString
Returns a line separated, indented version of this problem and its children
-
getMessage
The translated message for the source problem
-
getSource
The thing that caused all the problems
-
getIndentLevel
public int getIndentLevel()The number of ancestors this problem has
-
getChildren
A list of RenderedProblems for each child in source
-
equals
-
canEqual
-
hashCode
public int hashCode()
-