code: public long value() {
          switch (type) {
          case AVERAGE:
              return numPoints != 0 ? value / numPoints : 0;
          case NONE:
              return 0;
          case MAXIMUM:
          case MINIMUM:
          case SUM:
              return value;
          default:
              throw new IllegalStateException("Unknown type [" + type + "]!");
          }
      }
docs: Gets the data point value.
  
  <p>
  The returned value depends on type of data point's. See {@link Type}.
  </p>
  
  @return