public class Randoms extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BASE_CHAR |
static String |
BASE_CHAR_LOWER |
static String |
BASE_CHAR_NUMBER |
static String |
BASE_CHAR_NUMBER_LOWER |
static String |
BASE_NUMBER |
| 构造器和说明 |
|---|
Randoms() |
| 限定符和类型 | 方法和说明 |
|---|---|
static SecureRandom |
createSecureRandom(byte[] seed) |
static ThreadLocalRandom |
getRandom() |
static Random |
getRandom(boolean isSecure) |
static SecureRandom |
getSecureRandom() |
static SecureRandom |
getSecureRandom(byte[] seed) |
static SecureRandom |
getSHA1PRNGRandom(byte[] seed) |
static boolean |
randomBoolean() |
static byte[] |
randomBytes(int length) |
static char |
randomChar() |
static char |
randomChar(String baseString) |
static char |
randomChinese() |
static String |
randomChineseString(int length) |
static Color |
randomColor() |
static Date |
randomDate(Date baseDate,
int min,
int max) |
static double |
randomDouble() |
static double |
randomDouble(double limit) |
static double |
randomDouble(double min,
double max) |
static <T> T |
randomElement(List<T> list) |
static <T> T |
randomElement(List<T> list,
int limit) |
static <T> T |
randomElement(T[] array) |
static <T> T |
randomElement(T[] array,
int limit) |
static int[] |
randomIndices(int length) |
static int |
randomInt() |
static int |
randomInt(int limit) |
static int |
randomInt(int min,
int max) |
static long |
randomLong() |
static long |
randomLong(long limit) |
static long |
randomLong(long min,
long max) |
static char |
randomNumberChar() |
static String |
randomNumberString(int length) |
static String |
randomString(int length) |
static String |
randomString(String baseString,
int length) |
static String |
randomStringLowerCase(int length) |
static <T> List<T> |
randomSubList(List<T> source,
int count) |
static <T> Set<T> |
randomSubSet(Set<T> set,
int count) |
public static ThreadLocalRandom getRandom()
public static SecureRandom createSecureRandom(byte[] seed)
public static SecureRandom getSecureRandom()
public static SecureRandom getSecureRandom(byte[] seed)
public static SecureRandom getSHA1PRNGRandom(byte[] seed) throws NoSuchAlgorithmException
public static Random getRandom(boolean isSecure)
public static boolean randomBoolean()
public static char randomChinese()
public static int randomInt(int min,
int max)
public static int randomInt()
public static int randomInt(int limit)
public static long randomLong(long min,
long max)
public static long randomLong()
public static long randomLong(long limit)
public static double randomDouble(double min,
double max)
public static double randomDouble()
public static double randomDouble(double limit)
public static byte[] randomBytes(int length)
public static <T> T randomElement(List<T> list)
public static <T> T randomElement(List<T> list, int limit)
public static <T> T randomElement(T[] array)
public static <T> T randomElement(T[] array,
int limit)
public static int[] randomIndices(int length)
public static String randomNumberString(int length)
public static String randomString(int length)
public static String randomStringLowerCase(int length)
public static String randomChineseString(int length)
public static char randomNumberChar()
public static char randomChar()
public static char randomChar(String baseString)
public static Color randomColor()
Copyright © 2025 fossc. All rights reserved.