code: public void setThreshold(final double THRESHOLD) {
          if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) {
              threshold = THRESHOLD;
          } else {
              if (THRESHOLD < niceMinValue) {
                  threshold = niceMinValue;
              }
  
              if (THRESHOLD > niceMaxValue) {
                  threshold = niceMaxValue;
              }
          }
          fireStateChanged();
      }
docs: Sets the value for the threshold of the gauge
  @param THRESHOLD