code: static int asInteger(Object value, int min, int max) throws ProvidenceConfigException {
          if (value instanceof Long) {
              return validateInRange("Long", (Long) value, min, max);
          } else if (value instanceof Float || value instanceof Double) {
              long l = ((Number) value).longValue();
              if ((double) l != ((Number) value).doubleValue()) {
                  throw new ProvidenceConfigException("Truncating integer decimals from " + value.toString());
              }
              return validateInRange(value.getClass().getSimpleName(), l, min, max);
          } else if (value instanceof Number) {
              return validateInRange(value.getClass().getSimpleName(), ((Number) value).intValue(), min, max);
          } else if (value instanceof Numeric) {
              return validateInRange("Numeric", ((Numeric) value).asInteger(), min, max);
          } else if (value instanceof Boolean) {
              return ((Boolean) value) ? 1 : 0;
         }
          throw new ProvidenceConfigException("Unable to convert " + value.getClass().getSimpleName() + " to an int");
      }
docs: Convert the value to an integer.
  
  @param value The value instance.
  @return The integer value.
  @throws ProvidenceConfigException When unable to convert value.