Package org.languagetool.rules
Class Example
java.lang.Object
org.languagetool.rules.Example
Helper class to create error examples. For internal use by LanguageTool only.
- Since:
- 2.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CorrectExample
Create an example text (usually just one sentence) without an error - the fixed error (compared to the text created withwrong(String)
) can be marked with<marker>...</marker>
.private static void
requireMarkup
(String example) static IncorrectExample
Create an example text (usually just one sentence) with an error - the error must be marked with<marker>...</marker>
.
-
Constructor Details
-
Example
private Example()
-
-
Method Details
-
wrong
Create an example text (usually just one sentence) with an error - the error must be marked with<marker>...</marker>
.- Throws:
IllegalArgumentException
- if the<marker>...</marker>
is missing- Since:
- 2.5
-
fixed
Create an example text (usually just one sentence) without an error - the fixed error (compared to the text created withwrong(String)
) can be marked with<marker>...</marker>
.- Since:
- 2.5, return type modified in 3.5
-
requireMarkup
-