From 42f7d379a430aaf2fad169f0170de04072b08b10 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Fri, 22 Apr 2016 14:48:04 -0400 Subject: Formatting changes --- .../main/java/bjc/utils/funcutils/StringUtils.java | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/StringUtils.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/StringUtils.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/StringUtils.java index 728968e..2f8aa09 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/StringUtils.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/StringUtils.java @@ -10,6 +10,27 @@ import java.util.Deque; */ public class StringUtils { + /** + * Checks if the given expression contains the specified operator in a + * situation that indicates its use as an infix operator. + * + * @param expression + * The expression to check + * @param operator + * The operator to see if it is contained + * @return Whether or not the given expression contains the specified + * operator as a infix operator + */ + public static boolean containsInfixOperator(String expression, + String operator) { + // Bit annoying to have to use a full class name, but what are you + // going to do? + return org.apache.commons.lang3.StringUtils + .countMatches(expression, operator) == 1 + && !expression.equalsIgnoreCase(operator) + && !expression.startsWith(operator); + } + /** * Check if a string consists only of one or more matches of a regular * expression @@ -39,27 +60,6 @@ public class StringUtils { return input.matches("\\A(?:" + regex + ")+\\Z"); } - /** - * Checks if the given expression contains the specified operator in a - * situation that indicates its use as an infix operator. - * - * @param expression - * The expression to check - * @param operator - * The operator to see if it is contained - * @return Whether or not the given expression contains the specified - * operator as a infix operator - */ - public static boolean containsInfixOperator(String expression, - String operator) { - // Bit annoying to have to use a full class name, but what are you - // going to do? - return org.apache.commons.lang3.StringUtils - .countMatches(expression, operator) == 1 - && !expression.equalsIgnoreCase(operator) - && !expression.startsWith(operator); - } - /** * Indent the string being built in a StringBuilder n levels * -- cgit v1.2.3