-
Notifications
You must be signed in to change notification settings - Fork 235
Grouping Randomizers
A RandomizerRegistry is a logical group of randomizers. A registry holds multiple randomizers targeted to a specific types support. The JodaTimeRandomizerRegistry is such an example, it groups all randomizers that support generating random values for Joda time types. The ThreeTenRandomizerRegistry is another example that groups all randomizers that support Java 8 Date and Time types (JSR 310).
You can create your own custom registry by implementing the RandomizerRegistry interface. Then, you can register it either:
In this case, just add a jar in the class path specifying the provider implementation in META-INF/services and Random Beans will detect it automatially
EnhancedRandom enhancedRandom = new EnhancedRandomBuilder()
.registerRandomizerRegistry(myRegistry)
.build();Easy Random is created by Mahmoud Ben Hassine with the help of some awesome contributors!