docs: public void setThreshold(double threshold)
      {
          if(Double.isNaN(threshold) || threshold <= 0)
              throw new IllegalArgumentException("Threshold must be positive, not " + threshold);
          this.threshold = threshold;
      }