Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-97

RandomStringGenerator should be able to pass multiple ranges to .withinRange()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • None
    • 1.2
    • None

    Description

      Users should have ability to pass multiple ranges to generate desired output.

      Ex. For
      .randomNumeric()

      char [][]  ranges = {{'0','9'}};
      RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
      

      .randomAlphabetic()

      char [][]  ranges = {{'A','Z'}}; // or {{'A','Z'},{'a','z'}}
      RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
      

      .randomAlphanumeric()

      char [][]  ranges = {{'0','9'},{'A','Z'},{'a','b'}};
      RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ameyjadiye Amey Jadiye
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: