Class RuleOption

java.lang.Object
org.languagetool.rules.RuleOption

public class RuleOption extends Object
Class to configure rule option by option panel
Since:
6.5
  • Field Details

  • Constructor Details

    • RuleOption

      public RuleOption(Object defaultValue, String configureText, Object minConfigurableValue, Object maxConfigurableValue)
    • RuleOption

      public RuleOption(Object defaultValue, String configureText)
  • Method Details

    • getDefaultValue

      public Object getDefaultValue()
      Get a default Value by option panel
    • getConfigureText

      public String getConfigureText()
      Get the Configuration Text by option panel
    • getMinConfigurableValue

      public Object getMinConfigurableValue()
      Get the minimum of a configurable value
    • getMaxConfigurableValue

      public Object getMaxConfigurableValue()
      Get the maximum of a configurable value
    • objectToString

      public static String objectToString(Object o)
      Gives back a special String representation of an Object for save or communication add a character to characterize the type of object before its String value (i for Integer, b for Boolean, etc. Can be decoded by StringToObject
    • objectsToString

      public static String objectsToString(Object[] o)
      Gives back a special String representation of an array of Objects for save or communication use ObjectToString for encoding the single objects separate the objects by ';' Can be decoded by StringToObjects
    • stringToObject

      public static Object stringToObject(String s)
      decodes an String to an object encoded by ObjectToString Note: if there is no special encoding character at the beginning of the string an integer is assumed for compatibility with older versions of LT
    • stringToObjects

      public static Object[] stringToObjects(String s)
      decodes an String to an array of object encoded by ObjectsToString