From 0f196f59c6a4cb76ab8409da62ff1f35505f94a8 Mon Sep 17 00:00:00 2001 From: Dico Karssiens Date: Sun, 11 Nov 2018 14:06:45 +0000 Subject: Changes I made before breaking my local repository. Hoping this works. --- .../command/parameter/IArgumentPreProcessor.java | 82 +++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'dicore3/command/src/main/java/io/dico/dicore/command/parameter/IArgumentPreProcessor.java') diff --git a/dicore3/command/src/main/java/io/dico/dicore/command/parameter/IArgumentPreProcessor.java b/dicore3/command/src/main/java/io/dico/dicore/command/parameter/IArgumentPreProcessor.java index 0b8198e..5495cce 100644 --- a/dicore3/command/src/main/java/io/dico/dicore/command/parameter/IArgumentPreProcessor.java +++ b/dicore3/command/src/main/java/io/dico/dicore/command/parameter/IArgumentPreProcessor.java @@ -1,41 +1,41 @@ -package io.dico.dicore.command.parameter; - -/** - * An interface to process tokens such as quotes - */ -@Deprecated -public interface IArgumentPreProcessor { - - /** - * Preprocess the arguments contained within the given ArgumentBuffer. - * If no changes are made, this might return the same buffer. - * Any arguments preceding {@code buffer.getCursor()} will not be affected. - * - *

- * If {@code count} is non-negative, it declares a limit on the number of arguments after preprocessing. - * In that case, the buffer's cursor is set to the index of the first argument following processed arguments. - *

- * - * @param buffer the argument buffer - * @param count the maximum number of (processed) arguments - * @return the arguments after preprocessing - */ - ArgumentBuffer process(ArgumentBuffer buffer, int count); - - IArgumentPreProcessor NONE = (buffer, count) -> buffer; - - /** - * Get an IArgumentPreProcessor that merges arguments between any two tokens - * - * @param tokens The tokens that the merged arguments should be enclosed by, in subsequent pairs. - * Example: []{}"" - * This would mean the following would be merged: [ hello this is a merged argument] - * @param escapeChar the char that can be used to escape the given tokens - * @return The IArgumentPreProcessor - */ - static IArgumentPreProcessor mergeOnTokens(String tokens, char escapeChar) { - return new ArgumentMergingPreProcessor(tokens, escapeChar); - } - -} - +package io.dico.dicore.command.parameter; + +/** + * An interface to process tokens such as quotes + */ +@Deprecated +public interface IArgumentPreProcessor { + + /** + * Preprocess the arguments contained within the given ArgumentBuffer. + * If no changes are made, this might return the same buffer. + * Any arguments preceding {@code buffer.getCursor()} will not be affected. + * + *

+ * If {@code count} is non-negative, it declares a limit on the number of arguments after preprocessing. + * In that case, the buffer's cursor is set to the index of the first argument following processed arguments. + *

+ * + * @param buffer the argument buffer + * @param count the maximum number of (processed) arguments + * @return the arguments after preprocessing + */ + ArgumentBuffer process(ArgumentBuffer buffer, int count); + + IArgumentPreProcessor NONE = (buffer, count) -> buffer; + + /** + * Get an IArgumentPreProcessor that merges arguments between any two tokens + * + * @param tokens The tokens that the merged arguments should be enclosed by, in subsequent pairs. + * Example: []{}"" + * This would mean the following would be merged: [ hello this is a merged argument] + * @param escapeChar the char that can be used to escape the given tokens + * @return The IArgumentPreProcessor + */ + static IArgumentPreProcessor mergeOnTokens(String tokens, char escapeChar) { + return new ArgumentMergingPreProcessor(tokens, escapeChar); + } + +} + -- cgit v1.2.3