docs: @Override
  	public <T> T asObject(String string, Class<T> valueType) throws BugError {
  		if ("null".equals(string)) {
  			return null;
  		}
  		Number number = string.isEmpty() ? 0 : parseNumber(string);
  
  		// hopefully int and double are most used numeric types and test them first
  		if (Types.equalsAny(valueType, int.class, Integer.class)) {
  			return (T) (Integer) number.intValue();
  		}
  		if (Types.equalsAny(valueType, double.class, Double.class)) {
  			return (T) (Double) number.doubleValue();
  		}
  		if (Types.equalsAny(valueType, byte.class, Byte.class)) {
  			return (T) (Byte) number.byteValue();
  		}
  		if (Types.equalsAny(valueType, short.class, Short.class)) {
  			return (T) (Short) number.shortValue();
  		}
  		if (Types.equalsAny(valueType, long.class, Long.class)) {
  			// because converting between doubles and longs may result in loss of precision we need
  			// special treatment for longs. @see ConverterUnitTest.testConversionPrecision
  			if (string.length() > 0 && string.indexOf('.') == -1) {
  				// handle hexadecimal notation
  				if (string.length() > 1 && string.charAt(0) == '0' && string.charAt(1) == 'x') {
  					return (T) (Long) Long.parseLong(string.substring(2), 16);
  				}
  				return (T) (Long) Long.parseLong(string);
  			}
  			return (T) (Long) number.longValue();
  		}
  		if (Types.equalsAny(valueType, float.class, Float.class)) {
  			return (T) (Float) number.floatValue();
  		}
  		// if(Classes.equalsAny(t,BigInteger.class) {
  		// return (T)new BigInteger(number.doubleValue());
  		// }
  		if (Types.equalsAny(valueType, BigDecimal.class)) {
  			return (T) new BigDecimal(number.doubleValue());
  		}
  		throw new BugError("Unsupported numeric value |%s|.", valueType);
  	}