|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.identityconnectors.contract.data.RandomGenerator
public class RandomGenerator
Random generator uses a pattern to generate a random sequence based on given pattern.
the supported characters are (can appear in pattern string):
Any other character inside the pattern is directly printed to the output.
Backslash is used to escape any character. For instance pattern "###\\.##" prints a floating point random number
org.identityconnectors.contract.data.macro.RandomMacro -- written by Dan Vernon, the original source of random generating functionality.
Note: This is just a helper class. Users will directly use methods get() and
random() of class Lazy.
| Constructor Summary | |
|---|---|
RandomGenerator()
|
|
| Method Summary | |
|---|---|
static String |
generate(String pattern)
generate a random string based on given pattern |
static Object |
generate(String pattern,
Class<?> clazz)
generates a random string based on given pattern, finally tries to call constructor on the given class accepting a string argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomGenerator()
| Method Detail |
|---|
public static String generate(String pattern)
pattern - see the definition in class header
public static Object generate(String pattern,
Class<?> clazz)
generates a random string based on given pattern, finally tries to call constructor on the given class accepting a string argument.
pattern - see the definition in class header
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||