class ExponentialGenerator extends NumberGenerator {
  // What percentage of the readings should be within the most recent exponential.frac portion of the dataset?
  public static final String EXPONENTIAL_PERCENTILE_PROPERTY = "exponential.percentile";
  public static final String EXPONENTIAL_PERCENTILE_DEFAULT = "95";

  // What fraction of the dataset should be accessed exponential.percentile of the time?
  public static final String EXPONENTIAL_FRAC_PROPERTY = "exponential.frac";
  public static final String EXPONENTIAL_FRAC_DEFAULT = "0.8571428571";  // 1/7

  /**
   * The exponential constant to use.
   */
  private double gamma;

  /******************************* Constructors **************************************/

  /**
   * Create an exponential generator with a mean arrival rate of
   * gamma.  (And half life of 1/gamma).
   */
  public ExponentialGenerator(double mean) {
    gamma = 1.0 / mean;
  }

  public ExponentialGenerator(double percentile, double range) {
    gamma = -Math.log(1.0 - percentile / 100.0) / range;  //1.0/mean;
  }

  /****************************************************************************************/


  /**
   * Generate the next item as a long. This distribution will be skewed toward lower values; e.g. 0 will
   * be the most popular, 1 the next most popular, etc.
   * @return The next item in the sequence.
   */
  @Override
  public Double nextValue() {
    return -Math.log(ThreadLocalRandom.current().nextDouble()) / gamma;
  }

  @Override
  public double mean() {
    return 1.0 / gamma;
  }

  public static void main(String[] args) {<FILL_FUNCTION_BODY>}
}

    ExponentialGenerator e = new ExponentialGenerator(90, 100);
    int j = 0;
    for (int i = 0; i < 1000; i++) {
      if (e.nextValue() < 100) {
        j++;
      }
    }
    System.out.println("Got " + j + " hits.  Expect 900");
  
<methods>public non-sealed void <init>() ,public java.lang.Number lastValue() ,public abstract double mean() <variables>private java.lang.Number lastVal