public class RandomIdGenerator extends Object implements IdGenerator
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARSET
Default character set.
|
Constructor and Description |
---|
RandomIdGenerator(int length)
Creates a new instance with the default character set.
|
RandomIdGenerator(int length,
String charset)
Creates a new instance with a defined character set.
|
public static final String DEFAULT_CHARSET
public RandomIdGenerator(int length)
length
- Number of characters in generated identifiers.public RandomIdGenerator(int length, String charset)
length
- Number of characters in generated identifiers.charset
- Character set.public String generate()
IdGenerator
generate
in interface IdGenerator
Copyright © 2003-2024 Virginia Tech. All Rights Reserved.