Code example for Random

Methods: nextDouble

0
		else if (PrimitiveUtils.isLong(clazz))
			return (F)new Long(Math.abs(random.nextLong()));
		else if (PrimitiveUtils.isShort(clazz))
			return (F)new Short((short)Math.abs(random.nextInt(Integer.MAX_VALUE >> 16)));
		else if (PrimitiveUtils.isDouble(clazz))
			return (F)new Double(Math.floor(Math.abs(random.nextDouble()))+.1);
		else if (PrimitiveUtils.isFloat(clazz))
			return (F)new Float(Math.floor(Math.abs(random.nextFloat()))+.1);
		else if (PrimitiveUtils.isBigDecimal(clazz))
			return (F)new BigDecimal(Math.floor(Math.abs(random.nextFloat()))+.1);	
		else if (PrimitiveUtils.isString(clazz))
			return (F)new String("String"+Math.abs(random.nextInt()));
		else if (PrimitiveUtils.isDate(clazz)) {
			final long min = maxTime + random.nextInt();
			calendar.setTimeInMillis(min); 
			return (F)calendar.getTime();
		} 
		else if (PrimitiveUtils.isBoolean(clazz))
			return (F)(random.nextInt() % 2 == 0 ? Boolean.TRUE : Boolean.FALSE);
		else if (PrimitiveUtils.isObject(clazz))
			return (F)new Integer(-1);