From ce0a012423c92f191340d7fc71228b5095ad87e8 Mon Sep 17 00:00:00 2001 From: Valkryst Date: Sun, 19 Dec 2021 14:38:06 -0400 Subject: [PATCH] Rename `validateMaxLengthValid` to `validateMaxLength` --- .../VNameGenerator/generator/CombinatorialGenerator.java | 2 +- .../VNameGenerator/generator/ConsonantVowelGenerator.java | 2 +- .../com/valkryst/VNameGenerator/generator/GrammarGenerator.java | 2 +- .../com/valkryst/VNameGenerator/generator/MarkovGenerator.java | 2 +- .../com/valkryst/VNameGenerator/generator/NameGenerator.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/valkryst/VNameGenerator/generator/CombinatorialGenerator.java b/src/main/java/com/valkryst/VNameGenerator/generator/CombinatorialGenerator.java index e441d0f..3f6612a 100644 --- a/src/main/java/com/valkryst/VNameGenerator/generator/CombinatorialGenerator.java +++ b/src/main/java/com/valkryst/VNameGenerator/generator/CombinatorialGenerator.java @@ -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(); diff --git a/src/main/java/com/valkryst/VNameGenerator/generator/ConsonantVowelGenerator.java b/src/main/java/com/valkryst/VNameGenerator/generator/ConsonantVowelGenerator.java index 8589876..83a9d2d 100644 --- a/src/main/java/com/valkryst/VNameGenerator/generator/ConsonantVowelGenerator.java +++ b/src/main/java/com/valkryst/VNameGenerator/generator/ConsonantVowelGenerator.java @@ -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(); diff --git a/src/main/java/com/valkryst/VNameGenerator/generator/GrammarGenerator.java b/src/main/java/com/valkryst/VNameGenerator/generator/GrammarGenerator.java index 05d79af..e8b0e92 100644 --- a/src/main/java/com/valkryst/VNameGenerator/generator/GrammarGenerator.java +++ b/src/main/java/com/valkryst/VNameGenerator/generator/GrammarGenerator.java @@ -19,7 +19,7 @@ public GrammarGenerator(final @NonNull List rules) { @Override public String generate(final int maxLength) { - super.validateMaxLengthValid(maxLength); + super.validateMaxLength(maxLength); final var sb = new StringBuilder(); sb.append(contextFreeGrammar.run()); diff --git a/src/main/java/com/valkryst/VNameGenerator/generator/MarkovGenerator.java b/src/main/java/com/valkryst/VNameGenerator/generator/MarkovGenerator.java index 225c690..233515f 100644 --- a/src/main/java/com/valkryst/VNameGenerator/generator/MarkovGenerator.java +++ b/src/main/java/com/valkryst/VNameGenerator/generator/MarkovGenerator.java @@ -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 diff --git a/src/main/java/com/valkryst/VNameGenerator/generator/NameGenerator.java b/src/main/java/com/valkryst/VNameGenerator/generator/NameGenerator.java index 0c82204..87439e6 100644 --- a/src/main/java/com/valkryst/VNameGenerator/generator/NameGenerator.java +++ b/src/main/java/com/valkryst/VNameGenerator/generator/NameGenerator.java @@ -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."); }