private static <T> void validateNumeric(String name, String expected, NumberGetter<T> getter,
    Predicate<T>... predicates) {
    try {
      T value = getter.get();
      for (Predicate<T> predicate : predicates) {
        if (!predicate.test(value)) {
          throw new IllegalArgumentException("Invalid value for '" + name + "': " + value + ".");
        }
      }
    } catch (NumberFormatException e) {
      throw new IllegalArgumentException(String.format("'%s' must be %s.", name, expected), e);
    }
  }
Validates the configuration.
@param conf a configuration to validate
hbase-common/src/main/java/org/apache/hadoop/hbase/conf/ConfigKey.java