Package de.alpharogroup.random.number
Class RandomNumberExtensions
- java.lang.Object
-
- de.alpharogroup.random.number.RandomNumberExtensions
-
public final class RandomNumberExtensions extends java.lang.ObjectUtility class for producing random numbers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigDecimalgetRandomBigDecimal(int afterComma, int beforeComma)The Method getRandomBigDecimal(int,int) gets an random BigDecimal.static java.lang.StringgetRandomFloatString(int afterComma, int beforeComma)Gets the random float string.static java.lang.StringgetRandomNumericString()Generates a random numeric string.static java.lang.StringgetRandomNumericString(int length)The Method getRandomNumericString(int) produces a random Number to the specified length.static java.math.BigDecimalrandomBigDecimal()Generates a randomBigDecimalstatic java.math.BigIntegerrandomBigInteger()Generates a randomBigInteger
-
-
-
Method Detail
-
getRandomBigDecimal
public static java.math.BigDecimal getRandomBigDecimal(int afterComma, int beforeComma)The Method getRandomBigDecimal(int,int) gets an random BigDecimal.- Parameters:
afterComma- How many decimal places after the comma.beforeComma- How many decimal places before the comma.- Returns:
- The produced BigDecimal.
-
getRandomFloatString
public static java.lang.String getRandomFloatString(int afterComma, int beforeComma)Gets the random float string.- Parameters:
afterComma- How many decimal places after the comma.beforeComma- How many decimal places before the comma.- Returns:
- the random float string
-
getRandomNumericString
public static java.lang.String getRandomNumericString()
Generates a random numeric string.- Returns:
- the generated random numeric string.
-
getRandomNumericString
public static java.lang.String getRandomNumericString(int length)
The Method getRandomNumericString(int) produces a random Number to the specified length.- Parameters:
length- The length from the random number.- Returns:
- The random number as String.
-
randomBigDecimal
public static java.math.BigDecimal randomBigDecimal()
Generates a randomBigDecimal- Returns:
- the random
BigDecimal
-
randomBigInteger
public static java.math.BigInteger randomBigInteger()
Generates a randomBigInteger- Returns:
- the random
BigInteger
-
-