Package org.languagetool.rules
Class Example
- java.lang.Object
-
- org.languagetool.rules.Example
-
public final class Example extends Object
Helper class to create error examples. For internal use by LanguageTool only.- Since:
- 2.5
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CorrectExample
fixed(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>
.static IncorrectExample
wrong(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(String example)
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
public static CorrectExample fixed(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
-
-