Package org.languagetool.rules
Class Example
- java.lang.Object
-
- org.languagetool.rules.Example
-
public final class Example extends java.lang.Object
Helper class to create error examples. For internal use by LanguageTool only.- Since:
- 2.5
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Example()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CorrectExample
fixed(java.lang.String example)
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(java.lang.String example)
static IncorrectExample
wrong(java.lang.String example)
Create an example text (usually just one sentence) with an error - the error must be marked with<marker>...</marker>
.
-
-
-
Method Detail
-
wrong
public static IncorrectExample wrong(java.lang.String example)
Create an example text (usually just one sentence) with an error - the error must be marked with<marker>...</marker>
.- Throws:
java.lang.IllegalArgumentException
- if the<marker>...</marker>
is missing- Since:
- 2.5
-
fixed
public static CorrectExample fixed(java.lang.String example)
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
private static void requireMarkup(java.lang.String example)
-
-