Class TestError.Builder
java.lang.Object
org.openstreetmap.josm.data.validation.TestError.Builder
- Enclosing class:
- TestError
A builder for a
TestError.- Since:
- 11129
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate Stringprivate Stringprivate Collection<?>private booleanprivate Stringprivate Collection<? extends OsmPrimitive>private final Severityprivate final Testprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a new test error with the specified valuesSets a supplier to obtain a command to fix the error.Sets an area to highlight when selecting this error.highlight(Collection<? extends OsmPrimitive> highlighted) Sets the primitives to highlight when selecting this error.highlight(OsmPrimitive... highlighted) Sets the primitives to highlight when selecting this error.highlightNodePairs(Collection<List<Node>> highlighted) Sets the node pairs to highlight when selecting this error.highlightWaySegments(Collection<WaySegment> highlighted) Sets the way segments to highlight when selecting this error.Sets a flag that the list of primitives may be incomplete.Sets the error message.Sets the error message.messageWithManuallyTranslatedDescription(String message, String description, String descriptionEn) Sets the error message.primitives(Collection<? extends OsmPrimitive> primitives) Sets the primitives affected by this error.primitives(OsmPrimitive... primitives) Sets the primitives affected by this error.
-
Field Details
-
tester
-
severity
-
code
-
uniqueCode
-
message
-
description
-
descriptionEn
-
primitives
-
highlighted
-
fixingCommand
-
incompletePrimitives
-
-
Constructor Details
-
Builder
-
-
Method Details
-
message
Sets the error message.- Parameters:
message- The error message- Returns:
this
-
messageWithManuallyTranslatedDescription
public TestError.Builder messageWithManuallyTranslatedDescription(String message, String description, String descriptionEn) Sets the error message.- Parameters:
message- The message of this error groupdescription- The translated description of this errordescriptionEn- The English description (for ignoring errors)- Returns:
this
-
message
Sets the error message.- Parameters:
message- The message of this error groupmarktrDescription- The prepared for i18n description of this errorargs- The description arguments to be applied inI18n.tr(String, Object...)- Returns:
this
-
primitives
Sets the primitives affected by this error.- Parameters:
primitives- the primitives affected by this error- Returns:
this
-
primitives
Sets the primitives affected by this error.- Parameters:
primitives- the primitives affected by this error- Returns:
this
-
highlight
Sets the primitives to highlight when selecting this error.- Parameters:
highlighted- the primitives to highlight- Returns:
this- See Also:
-
highlight
Sets the primitives to highlight when selecting this error.- Parameters:
highlighted- the primitives to highlight- Returns:
this- See Also:
-
highlightWaySegments
Sets the way segments to highlight when selecting this error.- Parameters:
highlighted- the way segments to highlight- Returns:
this- See Also:
-
highlightNodePairs
Sets the node pairs to highlight when selecting this error.- Parameters:
highlighted- the node pairs to highlight- Returns:
this- See Also:
-
highlight
Sets an area to highlight when selecting this error.- Parameters:
highlighted- the area to highlight- Returns:
this
-
imcompletePrimitives
Sets a flag that the list of primitives may be incomplete. See #23397- Returns:
this
-
fix
Sets a supplier to obtain a command to fix the error.- Parameters:
fixingCommand- the fix supplier. Can be null- Returns:
this
-
build
Returns a new test error with the specified values- Returns:
- a new test error with the specified values
- Throws:
IllegalArgumentException- whenmessageorprimitivesis null.
-