Skip to content

Commit

Permalink
Rename validateMaxLengthValid to validateMaxLength
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkryst committed Dec 19, 2021
1 parent 23fd837 commit ce0a012
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public CombinatorialGenerator(final @NonNull String[] beginnings, final String[]

@Override
public String generate(int maxLength) {
super.validateMaxLengthValid(maxLength);
super.validateMaxLength(maxLength);
maxLength = super.randomizeMaxLength(maxLength);

final var stringBuilder = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ConsonantVowelGenerator() {

@Override
public String generate(int maxLength) {
super.validateMaxLengthValid(maxLength);
super.validateMaxLength(maxLength);
maxLength = super.randomizeMaxLength(maxLength);

final var stringBuilder = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public GrammarGenerator(final @NonNull List<String> rules) {

@Override
public String generate(final int maxLength) {
super.validateMaxLengthValid(maxLength);
super.validateMaxLength(maxLength);

final var sb = new StringBuilder();
sb.append(contextFreeGrammar.run());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public MarkovGenerator(final @NonNull String[] names) {

@Override
public String generate(int maxLength) {
super.validateMaxLengthValid(maxLength);
super.validateMaxLength(maxLength);

/*
* Even a small Markov Chain is capable of generating long names, but
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract class NameGenerator {
* @param maxLength A maximum length.
* @throws IllegalArgumentException If {@code maxLength} <= 0.
*/
protected final void validateMaxLengthValid(final int maxLength) throws IllegalArgumentException {
protected final void validateMaxLength(final int maxLength) throws IllegalArgumentException {
if (maxLength <= 0) {
throw new IllegalArgumentException("The maximum length, which is currently " + maxLength + " must be at least 1.");
}
Expand Down

0 comments on commit ce0a012

Please sign in to comment.