public int checkDouble() {
    if (typeCode != DOUBLE) {
      throw new IllegalArgumentException(
          String.format(
              "The statistic %s with id %s is of type %s and it was expected to be a double.",
              getName(), getId(),
              StatisticDescriptorImpl.getTypeCodeName(getTypeCode())));
    }
    return id;
  }
<code>StatisticDescriptor</code>s are naturally ordered by their name.

@throws IllegalArgumentException <code>o</code> is not a <code>StatisticDescriptor</code>

@see #getName
geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java