Package org.languagetool.rules
Class ConfusionSet
- java.lang.Object
-
- org.languagetool.rules.ConfusionSet
-
public class ConfusionSet extends java.lang.ObjectWords that can easily be confused - for internal use only. Even though there can be more words in the set, usually there are two, as the factor is specific for this pair of words.- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description private longfactorprivate java.util.Set<ConfusionString>set
-
Constructor Summary
Constructors Constructor Description ConfusionSet(long factor, java.lang.String... words)ConfusionSet(long factor, java.util.List<ConfusionString> confusionStrings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetFactor()java.util.Set<ConfusionString>getSet()java.util.Set<ConfusionString>getUppercaseFirstCharSet()inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
set
private final java.util.Set<ConfusionString> set
-
factor
private final long factor
-
-
Constructor Detail
-
ConfusionSet
public ConfusionSet(long factor, java.util.List<ConfusionString> confusionStrings)- Parameters:
factor- the factor that one string must be more probable than the other to be considered a correction, must be >= 1
-
ConfusionSet
public ConfusionSet(long factor, java.lang.String... words)- Parameters:
factor- the factor that one string must be more probable than the other to be considered a correction, must be >= 1
-
-
Method Detail
-
getFactor
public long getFactor()
-
getSet
public java.util.Set<ConfusionString> getSet()
-
getUppercaseFirstCharSet
public java.util.Set<ConfusionString> getUppercaseFirstCharSet()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-