Class UnitConversionRule

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.languagetool.rules.AbstractUnitConversionRule

        org.languagetool.rules.AbstractUnitConversionRule.Message
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.text.NumberFormat format  
      • Fields inherited from class org.languagetool.rules.AbstractUnitConversionRule

        convertedPatterns, FAHRENHEIT, FEET, IMP_FL_OUNCE, IMP_GALLON, IMP_PINT, IMP_QUART, INCH, metricUnits, MILE, NUMBER_REGEX, numberRangePart, OUNCE, POUND, specialPatterns, unitPatterns, unitSymbols, US_CUP, US_FL_OUNCE, US_GALLON, US_PINT, US_QUART, YARD
      • Fields inherited from class org.languagetool.rules.Rule

        messages
    • Constructor Summary

      Constructors 
      Constructor Description
      UnitConversionRule​(java.util.ResourceBundle messages)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getId()  
      protected java.text.NumberFormat getNumberFormat()  
      • Methods inherited from class org.languagetool.rules.AbstractUnitConversionRule

        addUnit, detectNumberRange, formatMeasurement, formatRounded, getMessage, getMetricEquivalent, getShortMessage, getSuggestion, match
      • Methods inherited from class org.languagetool.rules.Rule

        addExamplePair, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • format

        protected java.text.NumberFormat format
    • Constructor Detail

      • UnitConversionRule

        public UnitConversionRule​(java.util.ResourceBundle messages)
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in class org.languagetool.rules.Rule
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in class org.languagetool.rules.Rule
      • getNumberFormat

        protected java.text.NumberFormat getNumberFormat()
        Overrides:
        getNumberFormat in class org.languagetool.rules.AbstractUnitConversionRule