diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-02-09 11:50:31 -0500 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-02-09 11:50:31 -0500 |
| commit | d2af58b0f68ebfbba2be7e7679efec6c8c0af12f (patch) | |
| tree | 2b16fbf014db350126e8c1b5f081312276f85f62 /BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java | |
| parent | 187e1815488e3c1ed22e7592f304e632cffefb82 (diff) | |
Update
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java b/BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java index 709538b..79f6e3b 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcutils/TokenDeaffixer.java @@ -16,23 +16,19 @@ final class TokenDeaffixer @Override public IList<String> apply(String operatorName, String operatorRegex) { if (operatorName == null) { - throw new NullPointerException( - "Operator name must not be null"); + throw new NullPointerException("Operator name must not be null"); } else if (operatorRegex == null) { - throw new NullPointerException( - "Operator regex must not be null"); + throw new NullPointerException("Operator regex must not be null"); } if (StringUtils.containsOnly(token, operatorRegex)) { return new FunctionalList<>(token); } else if (token.startsWith(operatorName)) { - return new FunctionalList<>(operatorName, - token.split(operatorRegex)[1]); + return new FunctionalList<>(operatorName, token.split(operatorRegex)[1]); } else if (token.endsWith(operatorName)) { - return new FunctionalList<>(token.split(operatorRegex)[0], - operatorName); + return new FunctionalList<>(token.split(operatorRegex)[0], operatorName); } else { return new FunctionalList<>(token); } } -}
\ No newline at end of file +} |
