-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a immutable 'characterList' to receive characters passing by with… #125
base: master
Are you sure you want to change the base?
Conversation
…inRange and selectFrom to let method chaining is meaningful ```java GENERATOR = new RandomStringGenerator.Builder() .withinRange(CHAR_PAIRS) .selectFrom(',', ';', ':', '?', '*', '#', '!') .build(); ```
@ijliym |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my previous question. In general, don't mix style changes with behavior changes in your PRs, it makes them harder to review, so remove them, please.
@@ -247,6 +247,7 @@ public String generate(final int minLengthInclusive, final int maxLengthInclusiv | |||
* Some commonly used predicates are provided by the {@link CharacterPredicates} enum.</p> | |||
* | |||
* <p>This class is not thread safe.</p> | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for extra whitespace here.
@@ -328,7 +329,7 @@ public Builder withinRange(final int minimumCodePoint, final int maximumCodePoin | |||
* Specifies the array of minimum and maximum char allowed in the | |||
* generated string. | |||
* </p> | |||
* | |||
* <p> | |||
* For example: | |||
* <pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you open a p tag above, then close it before this pre tag.
* @return The configured {@code RandomStringGenerator} | ||
*/ | ||
@Override | ||
public RandomStringGenerator build() { | ||
return new RandomStringGenerator(minimumCodePoint, maximumCodePoint, inclusivePredicates, | ||
random, characterList); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add whitespace here.
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add whitespace here.
…inRange and selectFrom to let method chaining is meaningful
I think, multiple calls
selectFrom
method to replace the previously stored Character is no use.