Modifier and Type | Class and Description |
---|---|
static class |
TestError.Builder
A builder for a
TestError . |
Modifier and Type | Field and Description |
---|---|
private int |
code
Internal code used by testers to classify errors
|
private java.lang.String |
description
Deeper error description
|
private java.lang.String |
descriptionEn |
private java.util.function.Supplier<Command> |
fixingCommand
Supplying a command to fix the error
|
private java.util.Collection<?> |
highlighted
The primitives or way segments to be highlighted
|
private boolean |
ignored
is this error on the ignore list
|
private java.lang.String |
message
The error message
|
private java.util.Collection<? extends OsmPrimitive> |
primitives
The affected primitives
|
private boolean |
selected
If this error is selected
|
private Severity |
severity
Severity
|
private Test |
tester
The tester that raised this error
|
Constructor and Description |
---|
TestError(TestError.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static TestError.Builder |
builder(Test tester,
Severity severity,
int code)
Starts building a new
TestError |
int |
compareTo(TestError o) |
int |
getCode()
Gets the code
|
java.lang.String |
getDescription()
Gets the error message
|
Command |
getFix()
Fixes the error with the appropriate command
|
java.util.Collection<?> |
getHighlighted()
Returns The primitives or way segments to be highlighted
|
java.lang.String |
getIgnoreGroup() |
java.lang.String |
getIgnoreState()
Returns the ignore state for this error.
|
java.lang.String |
getIgnoreSubGroup() |
java.lang.String |
getMessage()
Gets the error message
|
java.util.Collection<? extends OsmPrimitive> |
getPrimitives()
Gets the list of primitives affected by this error
|
Severity |
getSeverity()
Gets the severity of this error
|
Test |
getTester()
Gets the tester that raised this error
|
boolean |
isFixable()
Returns true if the error can be fixed automatically
|
boolean |
isIgnored() |
boolean |
isSelected()
Returns the selection flag of this error
|
void |
setIgnored(boolean state) |
void |
setSelected(boolean selected)
Sets the selection flag of this error
|
java.lang.String |
toString() |
void |
visitHighlighted(ValidatorVisitor v) |
private boolean ignored
private final java.lang.String message
private final java.lang.String description
private final java.lang.String descriptionEn
private final java.util.Collection<? extends OsmPrimitive> primitives
private final java.util.Collection<?> highlighted
private final int code
private boolean selected
private final java.util.function.Supplier<Command> fixingCommand
TestError(TestError.Builder builder)
public static TestError.Builder builder(Test tester, Severity severity, int code)
TestError
tester
- The testerseverity
- The severity of this errorcode
- The test error reference codepublic java.lang.String getMessage()
public java.lang.String getDescription()
public java.util.Collection<? extends OsmPrimitive> getPrimitives()
public Severity getSeverity()
public java.lang.String getIgnoreState()
public java.lang.String getIgnoreSubGroup()
public java.lang.String getIgnoreGroup()
public void setIgnored(boolean state)
public boolean isIgnored()
public Test getTester()
public int getCode()
public boolean isFixable()
public Command getFix()
public void setSelected(boolean selected)
selected
- if this error is selectedpublic void visitHighlighted(ValidatorVisitor v)
public boolean isSelected()
public java.util.Collection<?> getHighlighted()
public int compareTo(TestError o)
compareTo
in interface java.lang.Comparable<TestError>
public java.lang.String toString()
toString
in class java.lang.Object