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