code: public double getAverage() {
          readLock.lock();
          try {
              // any values at all, needed to avoid a DivideByZero exception
              if (this.values.size() <= 0) {
                  return 0;
              }
              return ((double)this.total / (double)this.values.size());
          } finally {
              readLock.unlock();
          }
      }
docs: Returns current average of our running total.
  <br>
  NOTE: This method will use a readLock for thread-safety.
  @return The current average of our running total.