Class RegularExpressionRandomizer

  • All Implemented Interfaces:
    org.jeasy.random.api.Randomizer<java.lang.String>

    public class RegularExpressionRandomizer
    extends FakerBasedRandomizer<java.lang.String>
    A Randomizer that generates random strings matching a regular expression.
    • Constructor Detail

      • RegularExpressionRandomizer

        public RegularExpressionRandomizer​(java.lang.String regularExpression)
        Parameters:
        regularExpression - the regular expression which strings generated by this randomizer will match.
      • RegularExpressionRandomizer

        public RegularExpressionRandomizer​(java.lang.String regularExpression,
                                           long seed)
        Parameters:
        regularExpression - the regular expression which strings generated by this randomizer will match.
        seed - the initial seed
    • Method Detail

      • getRandomValue

        public java.lang.String getRandomValue()