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
Nested ClassesModifier and TypeClassDescriptionstatic classUsed for customizing the output of toString -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<RenderedProblem>A list of RenderedProblems for each child in sourcefinal intThe number of ancestors this problem hasfinal StringThe translated message for the source problemfinal ProblemThe thing that caused all the problems -
Constructor Summary
ConstructorsConstructorDescriptionRenderedProblem(String message, Problem source) RenderedProblem(String message, Problem source, int indentLevel, List<RenderedProblem> children) Creates a newRenderedProbleminstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanA list of RenderedProblems for each child in sourceintThe number of ancestors this problem hasThe translated message for the source problemThe thing that caused all the problemsinthashCode()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) Creates a new
RenderedProbleminstance.- Parameters:
message- The translated message for the source problemsource- The thing that caused all the problemsindentLevel- The number of ancestors this problem haschildren- A list of RenderedProblems for each child in source
-
-
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()
-