org.apache.poi.hssf.usermodel

## Class HSSFConditionalFormattingThreshold

- java.lang.Object
- - org.apache.poi.hssf.usermodel.HSSFConditionalFormattingThreshold

- All Implemented Interfaces:
    ConditionalFormattingThreshold

      public final class HSSFConditionalFormattingThreshold
      extends java.lang.Object
      implements ConditionalFormattingThreshold

  High level representation for Icon / Multi-State / Databar / Colour Scale change thresholds

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.poi.ss.usermodel.ConditionalFormattingThreshold

      `ConditionalFormattingThreshold.RangeType`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `HSSFConditionalFormattingThreshold(Threshold threshold, HSSFSheet sheet)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getFormula()` Formula to use to calculate the threshold, or `null` if no formula
    `ConditionalFormattingThreshold.RangeType` | `getRangeType()` Get the Range Type used
    `protected Threshold` | `getThreshold()`
    `java.lang.Double` | `getValue()` Gets the value used for the threshold, or `null` if there isn't one.
    `void` | `setFormula(java.lang.String formula)` Sets the formula used to calculate the threshold, or unsets it if `null` is given.
    `void` | `setRangeType(ConditionalFormattingThreshold.RangeType type)` Changes the Range Type used
    `void` | `setValue(java.lang.Double value)` Sets the value used for the threshold.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HSSFConditionalFormattingThreshold

          protected HSSFConditionalFormattingThreshold(Threshold threshold,
                                                       HSSFSheet sheet)

  - ### Method Detail

    - #### getThreshold

          protected Threshold getThreshold()

    - #### getRangeType

          public ConditionalFormattingThreshold.RangeType getRangeType()

      Description copied from interface: `ConditionalFormattingThreshold`
      Get the Range Type used
      Specified by:
        `getRangeType` in interface `ConditionalFormattingThreshold`

    - #### setRangeType

          public void setRangeType(ConditionalFormattingThreshold.RangeType type)

      Description copied from interface: `ConditionalFormattingThreshold`
      Changes the Range Type used

      If you change the range type, you need to ensure that the Formula and Value parameters are compatible with it before saving

      Specified by:
        `setRangeType` in interface `ConditionalFormattingThreshold`

    - #### getFormula

          public java.lang.String getFormula()

      Description copied from interface: `ConditionalFormattingThreshold`
      Formula to use to calculate the threshold, or `null` if no formula
      Specified by:
        `getFormula` in interface `ConditionalFormattingThreshold`

    - #### setFormula

          public void setFormula(java.lang.String formula)

      Description copied from interface: `ConditionalFormattingThreshold`
      Sets the formula used to calculate the threshold, or unsets it if `null` is given.
      Specified by:
        `setFormula` in interface `ConditionalFormattingThreshold`

    - #### getValue

          public java.lang.Double getValue()

      Description copied from interface: `ConditionalFormattingThreshold`
      Gets the value used for the threshold, or `null` if there isn't one.
      Specified by:
        `getValue` in interface `ConditionalFormattingThreshold`

    - #### setValue

          public void setValue(java.lang.Double value)

      Description copied from interface: `ConditionalFormattingThreshold`
      Sets the value used for the threshold.

      If the type is `ConditionalFormattingThreshold.RangeType.PERCENT` or `ConditionalFormattingThreshold.RangeType.PERCENTILE` it must be between 0 and 100.

      If the type is `ConditionalFormattingThreshold.RangeType.MIN` or `ConditionalFormattingThreshold.RangeType.MAX` or `ConditionalFormattingThreshold.RangeType.FORMULA` it shouldn't be set.

      Use `null` to unset

      Specified by:
        `setValue` in interface `ConditionalFormattingThreshold`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.