diff options
| author | EVE <EVE@EVE-PC> | 2017-03-13 16:42:21 -0400 |
|---|---|---|
| committer | EVE <EVE@EVE-PC> | 2017-03-13 16:42:21 -0400 |
| commit | 27bf571d6413c3cc6a5d664b5bddd38d21d7b1cd (patch) | |
| tree | 847fb52acb091c1c613d37b8477094d5762c6988 /BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java | |
| parent | aa807a96cae2c47259fb38f710640883060339e9 (diff) | |
Formatting
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java index eef55a8..6c660c6 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/RuleBasedReaderPragmas.java @@ -18,21 +18,19 @@ public class RuleBasedReaderPragmas { * Creates a pragma that takes a single integer argument * * @param <StateType> - * The type of state that goes along with this pragma + * The type of state that goes along with this pragma * @param name - * The name of this pragma, for error message purpose + * The name of this pragma, for error message purpose * @param consumer - * The function to invoke with the parsed integer + * The function to invoke with the parsed integer * @return A pragma that functions as described above. */ - public static <StateType> BiConsumer<FunctionalStringTokenizer, - StateType> buildInteger(String name, - BiConsumer<Integer, StateType> consumer) { + public static <StateType> BiConsumer<FunctionalStringTokenizer, StateType> buildInteger(String name, + BiConsumer<Integer, StateType> consumer) { return (tokenizer, state) -> { // Check our input is correct if (!tokenizer.hasMoreTokens()) { - throw new PragmaFormatException("Pragma " + name - + " requires one integer argument"); + throw new PragmaFormatException("Pragma " + name + " requires one integer argument"); } // Read the argument @@ -44,8 +42,7 @@ public class RuleBasedReaderPragmas { } catch (NumberFormatException nfex) { // Tell the user their argument isn't correct PragmaFormatException pfex = new PragmaFormatException( - "Argument " + token - + " to " + name + " pragma isn't a valid integer. " + "Argument " + token + " to " + name + " pragma isn't a valid integer. " + "This pragma requires a integer argument"); pfex.initCause(nfex); @@ -60,21 +57,20 @@ public class RuleBasedReaderPragmas { * them all into a single string * * @param <StateType> - * The type of state that goes along with this pragma + * The type of state that goes along with this pragma * @param name - * The name of this pragma, for error message purpose + * The name of this pragma, for error message purpose * @param consumer - * The function to invoke with the parsed string + * The function to invoke with the parsed string * @return A pragma that functions as described above. */ - public static <StateType> BiConsumer<FunctionalStringTokenizer, - StateType> buildStringCollapser(String name, - BiConsumer<String, StateType> consumer) { + public static <StateType> BiConsumer<FunctionalStringTokenizer, StateType> buildStringCollapser(String name, + BiConsumer<String, StateType> consumer) { return (tokenizer, state) -> { // Check our input if (!tokenizer.hasMoreTokens()) { - throw new PragmaFormatException("Pragma " + name - + " requires one or more string arguments"); + throw new PragmaFormatException( + "Pragma " + name + " requires one or more string arguments"); } // Build our argument |
