Class RandomUtils
java.lang.Object
cool.scx.common.util.RandomUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic voidrandomBytes(byte[] bytes) static byte[]randomBytes(int size) static doublestatic doublerandomDouble(double bound) static doublerandomDouble(double origin, double bound) static floatstatic floatrandomFloat(float bound) static floatrandomFloat(float origin, float bound) static <T> Tstatic <T> List<T> static <T> TrandomGet(T... array) static <T> T[]randomGet(T[] array, int size) static intstatic intrandomInt(int bound) static intrandomInt(int origin, int bound) static longstatic longrandomLong(long bound) static longrandomLong(long origin, long bound) static StringrandomString(int size, char[] pool) static StringrandomString(int size, String pool) static StringrandomString(int size, String[] pool) static String
-
Constructor Details
-
RandomUtils
public RandomUtils()
-
-
Method Details
-
randomUUID
-
randomInt
public static int randomInt() -
randomInt
public static int randomInt(int bound) -
randomInt
public static int randomInt(int origin, int bound) -
randomLong
public static long randomLong() -
randomLong
public static long randomLong(long bound) -
randomLong
public static long randomLong(long origin, long bound) -
randomFloat
public static float randomFloat() -
randomFloat
public static float randomFloat(float bound) -
randomFloat
public static float randomFloat(float origin, float bound) -
randomDouble
public static double randomDouble() -
randomDouble
public static double randomDouble(double bound) -
randomDouble
public static double randomDouble(double origin, double bound) -
randomBoolean
public static boolean randomBoolean() -
randomBytes
public static void randomBytes(byte[] bytes) -
randomBytes
public static byte[] randomBytes(int size) -
randomString
-
randomString
-
randomString
-
randomGet
-
randomGet
-
randomGet
public static <T> T[] randomGet(T[] array, int size) -
randomGet
-