Package rs.baselib.test
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.Stringbuild()Build the previously configured object.RandomStringBuilderwithChars(java.lang.String chars)Set the allowed chars (default [A-Za-z0-9])RandomStringBuilderwithLength(int length)Set the length of the strings to return.
-
Constructor Details
-
RandomStringBuilder
public RandomStringBuilder()Constructor.
-
-
Method Details
-
withChars
Set the allowed chars (default [A-Za-z0-9])- Parameters:
chars- - the allowed chars- Returns:
- this object for concatenation.
-
withLength
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.
-