Class RandomStringBuilder

java.lang.Object
rs.baselib.test.RandomStringBuilder
All Implemented Interfaces:
Builder<java.lang.String>

public class RandomStringBuilder
extends java.lang.Object
implements Builder<java.lang.String>
A random string builder.
Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    RandomStringBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String build()
    Build the previously configured object.
    RandomStringBuilder withChars​(java.lang.String chars)
    Set the allowed chars (default [A-Za-z0-9])
    RandomStringBuilder withLength​(int length)
    Set the length of the strings to return.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • withChars

      public RandomStringBuilder withChars​(java.lang.String chars)
      Set the allowed chars (default [A-Za-z0-9])
      Parameters:
      chars - - the allowed chars
      Returns:
      this object for concatenation.
    • withLength

      public RandomStringBuilder withLength​(int length)
      Set the length of the strings to return.
      Parameters:
      length - - the length
      Returns:
      this object for concatenation.
    • build

      public java.lang.String build()
      Build the previously configured object.
      Specified by:
      build in interface Builder<java.lang.String>
      Returns:
      the built object