You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/01/22 08:07:46 UTC
svn commit: r1436768 [10/13] - in /commons/proper/lang/trunk/src:
main/java/org/apache/commons/lang3/
main/java/org/apache/commons/lang3/builder/
main/java/org/apache/commons/lang3/concurrent/
main/java/org/apache/commons/lang3/event/ main/java/org/apa...
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrBuilder.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrBuilder.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrBuilder.java Tue Jan 22 07:07:42 2013
@@ -122,7 +122,7 @@ public class StrBuilder implements CharS
*
* @param str the string to copy, null treated as blank string
*/
- public StrBuilder(String str) {
+ public StrBuilder(final String str) {
super();
if (str == null) {
buffer = new char[CAPACITY];
@@ -148,7 +148,7 @@ public class StrBuilder implements CharS
* @param newLine the new line text, null means use system default
* @return this, to enable chaining
*/
- public StrBuilder setNewLineText(String newLine) {
+ public StrBuilder setNewLineText(final String newLine) {
this.newLine = newLine;
return this;
}
@@ -196,7 +196,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the length is negative
*/
- public StrBuilder setLength(int length) {
+ public StrBuilder setLength(final int length) {
if (length < 0) {
throw new StringIndexOutOfBoundsException(length);
}
@@ -230,7 +230,7 @@ public class StrBuilder implements CharS
* @param capacity the capacity to ensure
* @return this, to enable chaining
*/
- public StrBuilder ensureCapacity(int capacity) {
+ public StrBuilder ensureCapacity(final int capacity) {
if (capacity > buffer.length) {
char[] old = buffer;
buffer = new char[capacity * 2];
@@ -305,7 +305,7 @@ public class StrBuilder implements CharS
* @throws IndexOutOfBoundsException if the index is invalid
*/
@Override
- public char charAt(int index) {
+ public char charAt(final int index) {
if (index < 0 || index >= length()) {
throw new StringIndexOutOfBoundsException(index);
}
@@ -322,7 +322,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder setCharAt(int index, char ch) {
+ public StrBuilder setCharAt(final int index, final char ch) {
if (index < 0 || index >= length()) {
throw new StringIndexOutOfBoundsException(index);
}
@@ -339,7 +339,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder deleteCharAt(int index) {
+ public StrBuilder deleteCharAt(final int index) {
if (index < 0 || index >= size) {
throw new StringIndexOutOfBoundsException(index);
}
@@ -372,7 +372,7 @@ public class StrBuilder implements CharS
* @throws IndexOutOfBoundsException if startIndex is invalid,
* or if endIndex is invalid (but endIndex greater than size is valid)
*/
- public char[] toCharArray(int startIndex, int endIndex) {
+ public char[] toCharArray(final int startIndex, int endIndex) {
endIndex = validateRange(startIndex, endIndex);
int len = endIndex - startIndex;
if (len == 0) {
@@ -408,7 +408,7 @@ public class StrBuilder implements CharS
* @throws NullPointerException if the array is null
* @throws IndexOutOfBoundsException if any index is invalid
*/
- public void getChars(int startIndex, int endIndex, char destination[], int destinationIndex) {
+ public void getChars(final int startIndex, final int endIndex, final char destination[], final int destinationIndex) {
if (startIndex < 0) {
throw new StringIndexOutOfBoundsException(startIndex);
}
@@ -458,7 +458,7 @@ public class StrBuilder implements CharS
* @param obj the object to append
* @return this, to enable chaining
*/
- public StrBuilder append(Object obj) {
+ public StrBuilder append(final Object obj) {
if (obj == null) {
return appendNull();
}
@@ -474,7 +474,7 @@ public class StrBuilder implements CharS
* @since 3.0
*/
@Override
- public StrBuilder append(CharSequence seq) {
+ public StrBuilder append(final CharSequence seq) {
if (seq == null) {
return appendNull();
}
@@ -492,7 +492,7 @@ public class StrBuilder implements CharS
* @since 3.0
*/
@Override
- public StrBuilder append(CharSequence seq, int startIndex, int length) {
+ public StrBuilder append(final CharSequence seq, final int startIndex, final int length) {
if (seq == null) {
return appendNull();
}
@@ -506,7 +506,7 @@ public class StrBuilder implements CharS
* @param str the string to append
* @return this, to enable chaining
*/
- public StrBuilder append(String str) {
+ public StrBuilder append(final String str) {
if (str == null) {
return appendNull();
}
@@ -530,7 +530,7 @@ public class StrBuilder implements CharS
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
- public StrBuilder append(String str, int startIndex, int length) {
+ public StrBuilder append(final String str, final int startIndex, final int length) {
if (str == null) {
return appendNull();
}
@@ -558,7 +558,7 @@ public class StrBuilder implements CharS
* @see String#format(String, Object...)
* @since 3.2
*/
- public StrBuilder append(String format, Object... objs) {
+ public StrBuilder append(final String format, final Object... objs) {
return append(String.format(format, objs));
}
@@ -569,7 +569,7 @@ public class StrBuilder implements CharS
* @param str the string buffer to append
* @return this, to enable chaining
*/
- public StrBuilder append(StringBuffer str) {
+ public StrBuilder append(final StringBuffer str) {
if (str == null) {
return appendNull();
}
@@ -592,7 +592,7 @@ public class StrBuilder implements CharS
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
- public StrBuilder append(StringBuffer str, int startIndex, int length) {
+ public StrBuilder append(final StringBuffer str, final int startIndex, final int length) {
if (str == null) {
return appendNull();
}
@@ -619,7 +619,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 3.2
*/
- public StrBuilder append(StringBuilder str) {
+ public StrBuilder append(final StringBuilder str) {
if (str == null) {
return appendNull();
}
@@ -643,7 +643,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 3.2
*/
- public StrBuilder append(StringBuilder str, int startIndex, int length) {
+ public StrBuilder append(final StringBuilder str, final int startIndex, final int length) {
if (str == null) {
return appendNull();
}
@@ -669,7 +669,7 @@ public class StrBuilder implements CharS
* @param str the string builder to append
* @return this, to enable chaining
*/
- public StrBuilder append(StrBuilder str) {
+ public StrBuilder append(final StrBuilder str) {
if (str == null) {
return appendNull();
}
@@ -692,7 +692,7 @@ public class StrBuilder implements CharS
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
- public StrBuilder append(StrBuilder str, int startIndex, int length) {
+ public StrBuilder append(final StrBuilder str, final int startIndex, final int length) {
if (str == null) {
return appendNull();
}
@@ -718,7 +718,7 @@ public class StrBuilder implements CharS
* @param chars the char array to append
* @return this, to enable chaining
*/
- public StrBuilder append(char[] chars) {
+ public StrBuilder append(final char[] chars) {
if (chars == null) {
return appendNull();
}
@@ -741,7 +741,7 @@ public class StrBuilder implements CharS
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
- public StrBuilder append(char[] chars, int startIndex, int length) {
+ public StrBuilder append(final char[] chars, final int startIndex, final int length) {
if (chars == null) {
return appendNull();
}
@@ -766,7 +766,7 @@ public class StrBuilder implements CharS
* @param value the value to append
* @return this, to enable chaining
*/
- public StrBuilder append(boolean value) {
+ public StrBuilder append(final boolean value) {
if (value) {
ensureCapacity(size + 4);
buffer[size++] = 't';
@@ -792,7 +792,7 @@ public class StrBuilder implements CharS
* @since 3.0
*/
@Override
- public StrBuilder append(char ch) {
+ public StrBuilder append(final char ch) {
int len = length();
ensureCapacity(len + 1);
buffer[size++] = ch;
@@ -805,7 +805,7 @@ public class StrBuilder implements CharS
* @param value the value to append
* @return this, to enable chaining
*/
- public StrBuilder append(int value) {
+ public StrBuilder append(final int value) {
return append(String.valueOf(value));
}
@@ -815,7 +815,7 @@ public class StrBuilder implements CharS
* @param value the value to append
* @return this, to enable chaining
*/
- public StrBuilder append(long value) {
+ public StrBuilder append(final long value) {
return append(String.valueOf(value));
}
@@ -825,7 +825,7 @@ public class StrBuilder implements CharS
* @param value the value to append
* @return this, to enable chaining
*/
- public StrBuilder append(float value) {
+ public StrBuilder append(final float value) {
return append(String.valueOf(value));
}
@@ -835,7 +835,7 @@ public class StrBuilder implements CharS
* @param value the value to append
* @return this, to enable chaining
*/
- public StrBuilder append(double value) {
+ public StrBuilder append(final double value) {
return append(String.valueOf(value));
}
@@ -848,7 +848,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(Object obj) {
+ public StrBuilder appendln(final Object obj) {
return append(obj).appendNewLine();
}
@@ -860,7 +860,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(String str) {
+ public StrBuilder appendln(final String str) {
return append(str).appendNewLine();
}
@@ -874,7 +874,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(String str, int startIndex, int length) {
+ public StrBuilder appendln(final String str, final int startIndex, final int length) {
return append(str, startIndex, length).appendNewLine();
}
@@ -887,7 +887,7 @@ public class StrBuilder implements CharS
* @see String#format(String, Object...)
* @since 3.2
*/
- public StrBuilder appendln(String format, Object... objs) {
+ public StrBuilder appendln(final String format, final Object... objs) {
return append(format, objs).appendNewLine();
}
@@ -899,7 +899,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(StringBuffer str) {
+ public StrBuilder appendln(final StringBuffer str) {
return append(str).appendNewLine();
}
@@ -911,7 +911,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 3.2
*/
- public StrBuilder appendln(StringBuilder str) {
+ public StrBuilder appendln(final StringBuilder str) {
return append(str).appendNewLine();
}
@@ -925,7 +925,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 3.2
*/
- public StrBuilder appendln(StringBuilder str, int startIndex, int length) {
+ public StrBuilder appendln(final StringBuilder str, final int startIndex, final int length) {
return append(str, startIndex, length).appendNewLine();
}
@@ -939,7 +939,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(StringBuffer str, int startIndex, int length) {
+ public StrBuilder appendln(final StringBuffer str, final int startIndex, final int length) {
return append(str, startIndex, length).appendNewLine();
}
@@ -951,7 +951,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(StrBuilder str) {
+ public StrBuilder appendln(final StrBuilder str) {
return append(str).appendNewLine();
}
@@ -965,7 +965,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(StrBuilder str, int startIndex, int length) {
+ public StrBuilder appendln(final StrBuilder str, final int startIndex, final int length) {
return append(str, startIndex, length).appendNewLine();
}
@@ -977,7 +977,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(char[] chars) {
+ public StrBuilder appendln(final char[] chars) {
return append(chars).appendNewLine();
}
@@ -991,7 +991,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(char[] chars, int startIndex, int length) {
+ public StrBuilder appendln(final char[] chars, final int startIndex, final int length) {
return append(chars, startIndex, length).appendNewLine();
}
@@ -1002,7 +1002,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(boolean value) {
+ public StrBuilder appendln(final boolean value) {
return append(value).appendNewLine();
}
@@ -1013,7 +1013,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(char ch) {
+ public StrBuilder appendln(final char ch) {
return append(ch).appendNewLine();
}
@@ -1024,7 +1024,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(int value) {
+ public StrBuilder appendln(final int value) {
return append(value).appendNewLine();
}
@@ -1035,7 +1035,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(long value) {
+ public StrBuilder appendln(final long value) {
return append(value).appendNewLine();
}
@@ -1046,7 +1046,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(float value) {
+ public StrBuilder appendln(final float value) {
return append(value).appendNewLine();
}
@@ -1057,7 +1057,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendln(double value) {
+ public StrBuilder appendln(final double value) {
return append(value).appendNewLine();
}
@@ -1071,7 +1071,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public <T> StrBuilder appendAll(T... array) {
+ public <T> StrBuilder appendAll(final T... array) {
if (array != null && array.length > 0) {
for (Object element : array) {
append(element);
@@ -1089,7 +1089,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendAll(Iterable<?> iterable) {
+ public StrBuilder appendAll(final Iterable<?> iterable) {
if (iterable != null) {
for (Object o : iterable) {
append(o);
@@ -1107,7 +1107,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendAll(Iterator<?> it) {
+ public StrBuilder appendAll(final Iterator<?> it) {
if (it != null) {
while (it.hasNext()) {
append(it.next());
@@ -1127,7 +1127,7 @@ public class StrBuilder implements CharS
* @param separator the separator to use, null means no separator
* @return this, to enable chaining
*/
- public StrBuilder appendWithSeparators(Object[] array, String separator) {
+ public StrBuilder appendWithSeparators(final Object[] array, String separator) {
if (array != null && array.length > 0) {
separator = ObjectUtils.toString(separator);
append(array[0]);
@@ -1149,7 +1149,7 @@ public class StrBuilder implements CharS
* @param separator the separator to use, null means no separator
* @return this, to enable chaining
*/
- public StrBuilder appendWithSeparators(Iterable<?> iterable, String separator) {
+ public StrBuilder appendWithSeparators(final Iterable<?> iterable, String separator) {
if (iterable != null) {
separator = ObjectUtils.toString(separator);
Iterator<?> it = iterable.iterator();
@@ -1173,7 +1173,7 @@ public class StrBuilder implements CharS
* @param separator the separator to use, null means no separator
* @return this, to enable chaining
*/
- public StrBuilder appendWithSeparators(Iterator<?> it, String separator) {
+ public StrBuilder appendWithSeparators(final Iterator<?> it, String separator) {
if (it != null) {
separator = ObjectUtils.toString(separator);
while (it.hasNext()) {
@@ -1207,7 +1207,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendSeparator(String separator) {
+ public StrBuilder appendSeparator(final String separator) {
return appendSeparator(separator, null);
}
@@ -1238,7 +1238,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.5
*/
- public StrBuilder appendSeparator(String standard, String defaultIfEmpty) {
+ public StrBuilder appendSeparator(final String standard, final String defaultIfEmpty) {
String str = isEmpty() ? defaultIfEmpty : standard;
if (str != null) {
append(str);
@@ -1265,7 +1265,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendSeparator(char separator) {
+ public StrBuilder appendSeparator(final char separator) {
if (size() > 0) {
append(separator);
}
@@ -1283,7 +1283,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.5
*/
- public StrBuilder appendSeparator(char standard, char defaultIfEmpty) {
+ public StrBuilder appendSeparator(final char standard, final char defaultIfEmpty) {
if (size() > 0) {
append(standard);
} else {
@@ -1312,7 +1312,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendSeparator(String separator, int loopIndex) {
+ public StrBuilder appendSeparator(final String separator, final int loopIndex) {
if (separator != null && loopIndex > 0) {
append(separator);
}
@@ -1339,7 +1339,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @since 2.3
*/
- public StrBuilder appendSeparator(char separator, int loopIndex) {
+ public StrBuilder appendSeparator(final char separator, final int loopIndex) {
if (loopIndex > 0) {
append(separator);
}
@@ -1354,7 +1354,7 @@ public class StrBuilder implements CharS
* @param padChar the character to append
* @return this, to enable chaining
*/
- public StrBuilder appendPadding(int length, char padChar) {
+ public StrBuilder appendPadding(final int length, final char padChar) {
if (length >= 0) {
ensureCapacity(size + length);
for (int i = 0; i < length; i++) {
@@ -1376,7 +1376,7 @@ public class StrBuilder implements CharS
* @param padChar the pad character to use
* @return this, to enable chaining
*/
- public StrBuilder appendFixedWidthPadLeft(Object obj, int width, char padChar) {
+ public StrBuilder appendFixedWidthPadLeft(final Object obj, final int width, final char padChar) {
if (width > 0) {
ensureCapacity(size + width);
String str = (obj == null ? getNullText() : obj.toString());
@@ -1408,7 +1408,7 @@ public class StrBuilder implements CharS
* @param padChar the pad character to use
* @return this, to enable chaining
*/
- public StrBuilder appendFixedWidthPadLeft(int value, int width, char padChar) {
+ public StrBuilder appendFixedWidthPadLeft(final int value, final int width, final char padChar) {
return appendFixedWidthPadLeft(String.valueOf(value), width, padChar);
}
@@ -1423,7 +1423,7 @@ public class StrBuilder implements CharS
* @param padChar the pad character to use
* @return this, to enable chaining
*/
- public StrBuilder appendFixedWidthPadRight(Object obj, int width, char padChar) {
+ public StrBuilder appendFixedWidthPadRight(final Object obj, final int width, final char padChar) {
if (width > 0) {
ensureCapacity(size + width);
String str = (obj == null ? getNullText() : obj.toString());
@@ -1455,7 +1455,7 @@ public class StrBuilder implements CharS
* @param padChar the pad character to use
* @return this, to enable chaining
*/
- public StrBuilder appendFixedWidthPadRight(int value, int width, char padChar) {
+ public StrBuilder appendFixedWidthPadRight(final int value, final int width, final char padChar) {
return appendFixedWidthPadRight(String.valueOf(value), width, padChar);
}
@@ -1469,7 +1469,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, Object obj) {
+ public StrBuilder insert(final int index, final Object obj) {
if (obj == null) {
return insert(index, nullText);
}
@@ -1486,7 +1486,7 @@ public class StrBuilder implements CharS
* @throws IndexOutOfBoundsException if the index is invalid
*/
@SuppressWarnings("null") // str cannot be null
- public StrBuilder insert(int index, String str) {
+ public StrBuilder insert(final int index, String str) {
validateIndex(index);
if (str == null) {
str = nullText;
@@ -1511,7 +1511,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, char chars[]) {
+ public StrBuilder insert(final int index, final char chars[]) {
validateIndex(index);
if (chars == null) {
return insert(index, nullText);
@@ -1537,7 +1537,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if any index is invalid
*/
- public StrBuilder insert(int index, char chars[], int offset, int length) {
+ public StrBuilder insert(final int index, final char chars[], final int offset, final int length) {
validateIndex(index);
if (chars == null) {
return insert(index, nullText);
@@ -1565,7 +1565,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, boolean value) {
+ public StrBuilder insert(int index, final boolean value) {
validateIndex(index);
if (value) {
ensureCapacity(size + 4);
@@ -1596,7 +1596,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, char value) {
+ public StrBuilder insert(final int index, final char value) {
validateIndex(index);
ensureCapacity(size + 1);
System.arraycopy(buffer, index, buffer, index + 1, size - index);
@@ -1613,7 +1613,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, int value) {
+ public StrBuilder insert(final int index, final int value) {
return insert(index, String.valueOf(value));
}
@@ -1625,7 +1625,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, long value) {
+ public StrBuilder insert(final int index, final long value) {
return insert(index, String.valueOf(value));
}
@@ -1637,7 +1637,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, float value) {
+ public StrBuilder insert(final int index, final float value) {
return insert(index, String.valueOf(value));
}
@@ -1649,7 +1649,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder insert(int index, double value) {
+ public StrBuilder insert(final int index, final double value) {
return insert(index, String.valueOf(value));
}
@@ -1662,7 +1662,7 @@ public class StrBuilder implements CharS
* @param len the length, must be valid
* @throws IndexOutOfBoundsException if any index is invalid
*/
- private void deleteImpl(int startIndex, int endIndex, int len) {
+ private void deleteImpl(final int startIndex, final int endIndex, final int len) {
System.arraycopy(buffer, endIndex, buffer, startIndex, size - endIndex);
size -= len;
}
@@ -1676,7 +1676,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder delete(int startIndex, int endIndex) {
+ public StrBuilder delete(final int startIndex, int endIndex) {
endIndex = validateRange(startIndex, endIndex);
int len = endIndex - startIndex;
if (len > 0) {
@@ -1692,7 +1692,7 @@ public class StrBuilder implements CharS
* @param ch the character to delete
* @return this, to enable chaining
*/
- public StrBuilder deleteAll(char ch) {
+ public StrBuilder deleteAll(final char ch) {
for (int i = 0; i < size; i++) {
if (buffer[i] == ch) {
int start = i;
@@ -1715,7 +1715,7 @@ public class StrBuilder implements CharS
* @param ch the character to delete
* @return this, to enable chaining
*/
- public StrBuilder deleteFirst(char ch) {
+ public StrBuilder deleteFirst(final char ch) {
for (int i = 0; i < size; i++) {
if (buffer[i] == ch) {
deleteImpl(i, i + 1, 1);
@@ -1732,7 +1732,7 @@ public class StrBuilder implements CharS
* @param str the string to delete, null causes no action
* @return this, to enable chaining
*/
- public StrBuilder deleteAll(String str) {
+ public StrBuilder deleteAll(final String str) {
int len = (str == null ? 0 : str.length());
if (len > 0) {
int index = indexOf(str, 0);
@@ -1750,7 +1750,7 @@ public class StrBuilder implements CharS
* @param str the string to delete, null causes no action
* @return this, to enable chaining
*/
- public StrBuilder deleteFirst(String str) {
+ public StrBuilder deleteFirst(final String str) {
int len = (str == null ? 0 : str.length());
if (len > 0) {
int index = indexOf(str, 0);
@@ -1772,7 +1772,7 @@ public class StrBuilder implements CharS
* @param matcher the matcher to use to find the deletion, null causes no action
* @return this, to enable chaining
*/
- public StrBuilder deleteAll(StrMatcher matcher) {
+ public StrBuilder deleteAll(final StrMatcher matcher) {
return replace(matcher, null, 0, size, -1);
}
@@ -1786,7 +1786,7 @@ public class StrBuilder implements CharS
* @param matcher the matcher to use to find the deletion, null causes no action
* @return this, to enable chaining
*/
- public StrBuilder deleteFirst(StrMatcher matcher) {
+ public StrBuilder deleteFirst(final StrMatcher matcher) {
return replace(matcher, null, 0, size, 1);
}
@@ -1801,7 +1801,7 @@ public class StrBuilder implements CharS
* @param insertLen the length of the insert string, must be valid
* @throws IndexOutOfBoundsException if any index is invalid
*/
- private void replaceImpl(int startIndex, int endIndex, int removeLen, String insertStr, int insertLen) {
+ private void replaceImpl(final int startIndex, final int endIndex, final int removeLen, final String insertStr, final int insertLen) {
int newSize = size - removeLen + insertLen;
if (insertLen != removeLen) {
ensureCapacity(newSize);
@@ -1824,7 +1824,7 @@ public class StrBuilder implements CharS
* @return this, to enable chaining
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public StrBuilder replace(int startIndex, int endIndex, String replaceStr) {
+ public StrBuilder replace(final int startIndex, int endIndex, final String replaceStr) {
endIndex = validateRange(startIndex, endIndex);
int insertLen = (replaceStr == null ? 0 : replaceStr.length());
replaceImpl(startIndex, endIndex, endIndex - startIndex, replaceStr, insertLen);
@@ -1840,7 +1840,7 @@ public class StrBuilder implements CharS
* @param replace the replace character
* @return this, to enable chaining
*/
- public StrBuilder replaceAll(char search, char replace) {
+ public StrBuilder replaceAll(final char search, final char replace) {
if (search != replace) {
for (int i = 0; i < size; i++) {
if (buffer[i] == search) {
@@ -1859,7 +1859,7 @@ public class StrBuilder implements CharS
* @param replace the replace character
* @return this, to enable chaining
*/
- public StrBuilder replaceFirst(char search, char replace) {
+ public StrBuilder replaceFirst(final char search, final char replace) {
if (search != replace) {
for (int i = 0; i < size; i++) {
if (buffer[i] == search) {
@@ -1879,7 +1879,7 @@ public class StrBuilder implements CharS
* @param replaceStr the replace string, null is equivalent to an empty string
* @return this, to enable chaining
*/
- public StrBuilder replaceAll(String searchStr, String replaceStr) {
+ public StrBuilder replaceAll(final String searchStr, final String replaceStr) {
int searchLen = (searchStr == null ? 0 : searchStr.length());
if (searchLen > 0) {
int replaceLen = (replaceStr == null ? 0 : replaceStr.length());
@@ -1899,7 +1899,7 @@ public class StrBuilder implements CharS
* @param replaceStr the replace string, null is equivalent to an empty string
* @return this, to enable chaining
*/
- public StrBuilder replaceFirst(String searchStr, String replaceStr) {
+ public StrBuilder replaceFirst(final String searchStr, final String replaceStr) {
int searchLen = (searchStr == null ? 0 : searchStr.length());
if (searchLen > 0) {
int index = indexOf(searchStr, 0);
@@ -1923,7 +1923,7 @@ public class StrBuilder implements CharS
* @param replaceStr the replace string, null is equivalent to an empty string
* @return this, to enable chaining
*/
- public StrBuilder replaceAll(StrMatcher matcher, String replaceStr) {
+ public StrBuilder replaceAll(final StrMatcher matcher, final String replaceStr) {
return replace(matcher, replaceStr, 0, size, -1);
}
@@ -1938,7 +1938,7 @@ public class StrBuilder implements CharS
* @param replaceStr the replace string, null is equivalent to an empty string
* @return this, to enable chaining
*/
- public StrBuilder replaceFirst(StrMatcher matcher, String replaceStr) {
+ public StrBuilder replaceFirst(final StrMatcher matcher, final String replaceStr) {
return replace(matcher, replaceStr, 0, size, 1);
}
@@ -1960,8 +1960,8 @@ public class StrBuilder implements CharS
* @throws IndexOutOfBoundsException if start index is invalid
*/
public StrBuilder replace(
- StrMatcher matcher, String replaceStr,
- int startIndex, int endIndex, int replaceCount) {
+ final StrMatcher matcher, final String replaceStr,
+ final int startIndex, int endIndex, final int replaceCount) {
endIndex = validateRange(startIndex, endIndex);
return replaceImpl(matcher, replaceStr, startIndex, endIndex, replaceCount);
}
@@ -1982,8 +1982,8 @@ public class StrBuilder implements CharS
* @throws IndexOutOfBoundsException if any index is invalid
*/
private StrBuilder replaceImpl(
- StrMatcher matcher, String replaceStr,
- int from, int to, int replaceCount) {
+ final StrMatcher matcher, final String replaceStr,
+ final int from, int to, int replaceCount) {
if (matcher == null || size == 0) {
return this;
}
@@ -2062,7 +2062,7 @@ public class StrBuilder implements CharS
* @param str the string to search for, null returns false
* @return true if the builder starts with the string
*/
- public boolean startsWith(String str) {
+ public boolean startsWith(final String str) {
if (str == null) {
return false;
}
@@ -2089,7 +2089,7 @@ public class StrBuilder implements CharS
* @param str the string to search for, null returns false
* @return true if the builder ends with the string
*/
- public boolean endsWith(String str) {
+ public boolean endsWith(final String str) {
if (str == null) {
return false;
}
@@ -2115,7 +2115,7 @@ public class StrBuilder implements CharS
* @since 3.0
*/
@Override
- public CharSequence subSequence(int startIndex, int endIndex) {
+ public CharSequence subSequence(final int startIndex, final int endIndex) {
if (startIndex < 0) {
throw new StringIndexOutOfBoundsException(startIndex);
}
@@ -2135,7 +2135,7 @@ public class StrBuilder implements CharS
* @return the new string
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public String substring(int start) {
+ public String substring(final int start) {
return substring(start, size);
}
@@ -2152,7 +2152,7 @@ public class StrBuilder implements CharS
* @return the new string
* @throws IndexOutOfBoundsException if the index is invalid
*/
- public String substring(int startIndex, int endIndex) {
+ public String substring(final int startIndex, int endIndex) {
endIndex = validateRange(startIndex, endIndex);
return new String(buffer, startIndex, endIndex - startIndex);
}
@@ -2169,7 +2169,7 @@ public class StrBuilder implements CharS
* @param length the number of characters to extract, negative returns empty string
* @return the new string
*/
- public String leftString(int length) {
+ public String leftString(final int length) {
if (length <= 0) {
return "";
} else if (length >= size) {
@@ -2191,7 +2191,7 @@ public class StrBuilder implements CharS
* @param length the number of characters to extract, negative returns empty string
* @return the new string
*/
- public String rightString(int length) {
+ public String rightString(final int length) {
if (length <= 0) {
return "";
} else if (length >= size) {
@@ -2217,7 +2217,7 @@ public class StrBuilder implements CharS
* @param length the number of characters to extract, negative returns empty string
* @return the new string
*/
- public String midString(int index, int length) {
+ public String midString(int index, final int length) {
if (index < 0) {
index = 0;
}
@@ -2238,7 +2238,7 @@ public class StrBuilder implements CharS
* @param ch the character to find
* @return true if the builder contains the character
*/
- public boolean contains(char ch) {
+ public boolean contains(final char ch) {
char[] thisBuf = buffer;
for (int i = 0; i < this.size; i++) {
if (thisBuf[i] == ch) {
@@ -2254,7 +2254,7 @@ public class StrBuilder implements CharS
* @param str the string to find
* @return true if the builder contains the string
*/
- public boolean contains(String str) {
+ public boolean contains(final String str) {
return indexOf(str, 0) >= 0;
}
@@ -2269,7 +2269,7 @@ public class StrBuilder implements CharS
* @param matcher the matcher to use, null returns -1
* @return true if the matcher finds a match in the builder
*/
- public boolean contains(StrMatcher matcher) {
+ public boolean contains(final StrMatcher matcher) {
return indexOf(matcher, 0) >= 0;
}
@@ -2280,7 +2280,7 @@ public class StrBuilder implements CharS
* @param ch the character to find
* @return the first index of the character, or -1 if not found
*/
- public int indexOf(char ch) {
+ public int indexOf(final char ch) {
return indexOf(ch, 0);
}
@@ -2291,7 +2291,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the first index of the character, or -1 if not found
*/
- public int indexOf(char ch, int startIndex) {
+ public int indexOf(final char ch, int startIndex) {
startIndex = (startIndex < 0 ? 0 : startIndex);
if (startIndex >= size) {
return -1;
@@ -2313,7 +2313,7 @@ public class StrBuilder implements CharS
* @param str the string to find, null returns -1
* @return the first index of the string, or -1 if not found
*/
- public int indexOf(String str) {
+ public int indexOf(final String str) {
return indexOf(str, 0);
}
@@ -2327,7 +2327,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the first index of the string, or -1 if not found
*/
- public int indexOf(String str, int startIndex) {
+ public int indexOf(final String str, int startIndex) {
startIndex = (startIndex < 0 ? 0 : startIndex);
if (str == null || startIndex >= size) {
return -1;
@@ -2366,7 +2366,7 @@ public class StrBuilder implements CharS
* @param matcher the matcher to use, null returns -1
* @return the first index matched, or -1 if not found
*/
- public int indexOf(StrMatcher matcher) {
+ public int indexOf(final StrMatcher matcher) {
return indexOf(matcher, 0);
}
@@ -2382,7 +2382,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the first index matched, or -1 if not found
*/
- public int indexOf(StrMatcher matcher, int startIndex) {
+ public int indexOf(final StrMatcher matcher, int startIndex) {
startIndex = (startIndex < 0 ? 0 : startIndex);
if (matcher == null || startIndex >= size) {
return -1;
@@ -2404,7 +2404,7 @@ public class StrBuilder implements CharS
* @param ch the character to find
* @return the last index of the character, or -1 if not found
*/
- public int lastIndexOf(char ch) {
+ public int lastIndexOf(final char ch) {
return lastIndexOf(ch, size - 1);
}
@@ -2415,7 +2415,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the last index of the character, or -1 if not found
*/
- public int lastIndexOf(char ch, int startIndex) {
+ public int lastIndexOf(final char ch, int startIndex) {
startIndex = (startIndex >= size ? size - 1 : startIndex);
if (startIndex < 0) {
return -1;
@@ -2436,7 +2436,7 @@ public class StrBuilder implements CharS
* @param str the string to find, null returns -1
* @return the last index of the string, or -1 if not found
*/
- public int lastIndexOf(String str) {
+ public int lastIndexOf(final String str) {
return lastIndexOf(str, size - 1);
}
@@ -2450,7 +2450,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the last index of the string, or -1 if not found
*/
- public int lastIndexOf(String str, int startIndex) {
+ public int lastIndexOf(final String str, int startIndex) {
startIndex = (startIndex >= size ? size - 1 : startIndex);
if (str == null || startIndex < 0) {
return -1;
@@ -2487,7 +2487,7 @@ public class StrBuilder implements CharS
* @param matcher the matcher to use, null returns -1
* @return the last index matched, or -1 if not found
*/
- public int lastIndexOf(StrMatcher matcher) {
+ public int lastIndexOf(final StrMatcher matcher) {
return lastIndexOf(matcher, size);
}
@@ -2503,7 +2503,7 @@ public class StrBuilder implements CharS
* @param startIndex the index to start at, invalid index rounded to edge
* @return the last index matched, or -1 if not found
*/
- public int lastIndexOf(StrMatcher matcher, int startIndex) {
+ public int lastIndexOf(final StrMatcher matcher, int startIndex) {
startIndex = (startIndex >= size ? size - 1 : startIndex);
if (matcher == null || startIndex < 0) {
return -1;
@@ -2642,7 +2642,7 @@ public class StrBuilder implements CharS
* @param other the object to check, null returns false
* @return true if the builders contain the same characters in the same order
*/
- public boolean equalsIgnoreCase(StrBuilder other) {
+ public boolean equalsIgnoreCase(final StrBuilder other) {
if (this == other) {
return true;
}
@@ -2668,7 +2668,7 @@ public class StrBuilder implements CharS
* @param other the object to check, null returns false
* @return true if the builders contain the same characters in the same order
*/
- public boolean equals(StrBuilder other) {
+ public boolean equals(final StrBuilder other) {
if (this == other) {
return true;
}
@@ -2693,7 +2693,7 @@ public class StrBuilder implements CharS
* @return true if the builders contain the same characters in the same order
*/
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (obj instanceof StrBuilder) {
return equals((StrBuilder) obj);
}
@@ -2772,7 +2772,7 @@ public class StrBuilder implements CharS
* @return the new string
* @throws IndexOutOfBoundsException if the index is invalid
*/
- protected int validateRange(int startIndex, int endIndex) {
+ protected int validateRange(final int startIndex, int endIndex) {
if (startIndex < 0) {
throw new StringIndexOutOfBoundsException(startIndex);
}
@@ -2791,7 +2791,7 @@ public class StrBuilder implements CharS
* @param index the index, must be valid
* @throws IndexOutOfBoundsException if the index is invalid
*/
- protected void validateIndex(int index) {
+ protected void validateIndex(final int index) {
if (index < 0 || index > size) {
throw new StringIndexOutOfBoundsException(index);
}
@@ -2812,7 +2812,7 @@ public class StrBuilder implements CharS
/** {@inheritDoc} */
@Override
- protected List<String> tokenize(char[] chars, int offset, int count) {
+ protected List<String> tokenize(final char[] chars, final int offset, final int count) {
if (chars == null) {
return super.tokenize(StrBuilder.this.buffer, 0, StrBuilder.this.size());
} else {
@@ -2866,7 +2866,7 @@ public class StrBuilder implements CharS
/** {@inheritDoc} */
@Override
- public int read(char b[], int off, int len) {
+ public int read(final char b[], final int off, int len) {
if (off < 0 || len < 0 || off > b.length ||
(off + len) > b.length || (off + len) < 0) {
throw new IndexOutOfBoundsException();
@@ -2912,7 +2912,7 @@ public class StrBuilder implements CharS
/** {@inheritDoc} */
@Override
- public void mark(int readAheadLimit) {
+ public void mark(final int readAheadLimit) {
mark = pos;
}
@@ -2950,31 +2950,31 @@ public class StrBuilder implements CharS
/** {@inheritDoc} */
@Override
- public void write(int c) {
+ public void write(final int c) {
StrBuilder.this.append((char) c);
}
/** {@inheritDoc} */
@Override
- public void write(char[] cbuf) {
+ public void write(final char[] cbuf) {
StrBuilder.this.append(cbuf);
}
/** {@inheritDoc} */
@Override
- public void write(char[] cbuf, int off, int len) {
+ public void write(final char[] cbuf, final int off, final int len) {
StrBuilder.this.append(cbuf, off, len);
}
/** {@inheritDoc} */
@Override
- public void write(String str) {
+ public void write(final String str) {
StrBuilder.this.append(str);
}
/** {@inheritDoc} */
@Override
- public void write(String str, int off, int len) {
+ public void write(final String str, final int off, final int len) {
StrBuilder.this.append(str, off, len);
}
}
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrLookup.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrLookup.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrLookup.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrLookup.java Tue Jan 22 07:07:42 2013
@@ -93,7 +93,7 @@ public abstract class StrLookup<V> {
* @param map the map of keys to values, may be null
* @return a lookup using the map, not null
*/
- public static <V> StrLookup<V> mapLookup(Map<String, V> map) {
+ public static <V> StrLookup<V> mapLookup(final Map<String, V> map) {
return new MapStrLookup<V>(map);
}
@@ -144,7 +144,7 @@ public abstract class StrLookup<V> {
*
* @param map the map of keys to values, may be null
*/
- MapStrLookup(Map<String, V> map) {
+ MapStrLookup(final Map<String, V> map) {
this.map = map;
}
@@ -158,7 +158,7 @@ public abstract class StrLookup<V> {
* @return the matching value, null if no match
*/
@Override
- public String lookup(String key) {
+ public String lookup(final String key) {
if (map == null) {
return null;
}
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrMatcher.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrMatcher.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrMatcher.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrMatcher.java Tue Jan 22 07:07:42 2013
@@ -160,7 +160,7 @@ public abstract class StrMatcher {
* @param ch the character to match, must not be null
* @return a new Matcher for the given char
*/
- public static StrMatcher charMatcher(char ch) {
+ public static StrMatcher charMatcher(final char ch) {
return new CharMatcher(ch);
}
@@ -170,7 +170,7 @@ public abstract class StrMatcher {
* @param chars the characters to match, null or empty matches nothing
* @return a new matcher for the given char[]
*/
- public static StrMatcher charSetMatcher(char... chars) {
+ public static StrMatcher charSetMatcher(final char... chars) {
if (chars == null || chars.length == 0) {
return NONE_MATCHER;
}
@@ -186,7 +186,7 @@ public abstract class StrMatcher {
* @param chars the characters to match, null or empty matches nothing
* @return a new Matcher for the given characters
*/
- public static StrMatcher charSetMatcher(String chars) {
+ public static StrMatcher charSetMatcher(final String chars) {
if (StringUtils.isEmpty(chars)) {
return NONE_MATCHER;
}
@@ -202,7 +202,7 @@ public abstract class StrMatcher {
* @param str the string to match, null or empty matches nothing
* @return a new Matcher for the given String
*/
- public static StrMatcher stringMatcher(String str) {
+ public static StrMatcher stringMatcher(final String str) {
if (StringUtils.isEmpty(str)) {
return NONE_MATCHER;
}
@@ -264,7 +264,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
* @since 2.4
*/
- public int isMatch(char[] buffer, int pos) {
+ public int isMatch(final char[] buffer, final int pos) {
return isMatch(buffer, pos, 0, buffer.length);
}
@@ -281,7 +281,7 @@ public abstract class StrMatcher {
*
* @param chars the characters to match, must not be null
*/
- CharSetMatcher(char chars[]) {
+ CharSetMatcher(final char chars[]) {
super();
this.chars = chars.clone();
Arrays.sort(this.chars);
@@ -297,7 +297,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
*/
@Override
- public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
+ public int isMatch(final char[] buffer, final int pos, final int bufferStart, final int bufferEnd) {
return Arrays.binarySearch(chars, buffer[pos]) >= 0 ? 1 : 0;
}
}
@@ -315,7 +315,7 @@ public abstract class StrMatcher {
*
* @param ch the character to match
*/
- CharMatcher(char ch) {
+ CharMatcher(final char ch) {
super();
this.ch = ch;
}
@@ -330,7 +330,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
*/
@Override
- public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
+ public int isMatch(final char[] buffer, final int pos, final int bufferStart, final int bufferEnd) {
return ch == buffer[pos] ? 1 : 0;
}
}
@@ -348,7 +348,7 @@ public abstract class StrMatcher {
*
* @param str the string to match, must not be null
*/
- StringMatcher(String str) {
+ StringMatcher(final String str) {
super();
chars = str.toCharArray();
}
@@ -363,7 +363,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
*/
@Override
- public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
+ public int isMatch(final char[] buffer, int pos, final int bufferStart, final int bufferEnd) {
int len = chars.length;
if (pos + len > bufferEnd) {
return 0;
@@ -400,7 +400,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
*/
@Override
- public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
+ public int isMatch(final char[] buffer, final int pos, final int bufferStart, final int bufferEnd) {
return 0;
}
}
@@ -428,7 +428,7 @@ public abstract class StrMatcher {
* @return the number of matching characters, zero for no match
*/
@Override
- public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
+ public int isMatch(final char[] buffer, final int pos, final int bufferStart, final int bufferEnd) {
return buffer[pos] <= 32 ? 1 : 0;
}
}
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java Tue Jan 22 07:07:42 2013
@@ -146,7 +146,7 @@ public class StrSubstitutor {
* @param valueMap the map with the values, may be null
* @return the result of the replace operation
*/
- public static <V> String replace(Object source, Map<String, V> valueMap) {
+ public static <V> String replace(final Object source, final Map<String, V> valueMap) {
return new StrSubstitutor(valueMap).replace(source);
}
@@ -163,7 +163,7 @@ public class StrSubstitutor {
* @return the result of the replace operation
* @throws IllegalArgumentException if the prefix or suffix is null
*/
- public static <V> String replace(Object source, Map<String, V> valueMap, String prefix, String suffix) {
+ public static <V> String replace(final Object source, final Map<String, V> valueMap, final String prefix, final String suffix) {
return new StrSubstitutor(valueMap, prefix, suffix).replace(source);
}
@@ -175,7 +175,7 @@ public class StrSubstitutor {
* @param valueProperties the properties with values, may be null
* @return the result of the replace operation
*/
- public static String replace(Object source, Properties valueProperties) {
+ public static String replace(final Object source, final Properties valueProperties) {
if (valueProperties == null) {
return source.toString();
}
@@ -196,7 +196,7 @@ public class StrSubstitutor {
* @param source the source text containing the variables to substitute, null returns null
* @return the result of the replace operation
*/
- public static String replaceSystemProperties(Object source) {
+ public static String replaceSystemProperties(final Object source) {
return new StrSubstitutor(StrLookup.systemPropertiesLookup()).replace(source);
}
@@ -216,7 +216,7 @@ public class StrSubstitutor {
* @param <V> the type of the values in the map
* @param valueMap the map with the variables' values, may be null
*/
- public <V> StrSubstitutor(Map<String, V> valueMap) {
+ public <V> StrSubstitutor(final Map<String, V> valueMap) {
this(StrLookup.mapLookup(valueMap), DEFAULT_PREFIX, DEFAULT_SUFFIX, DEFAULT_ESCAPE);
}
@@ -229,7 +229,7 @@ public class StrSubstitutor {
* @param suffix the suffix for variables, not null
* @throws IllegalArgumentException if the prefix or suffix is null
*/
- public <V> StrSubstitutor(Map<String, V> valueMap, String prefix, String suffix) {
+ public <V> StrSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix) {
this(StrLookup.mapLookup(valueMap), prefix, suffix, DEFAULT_ESCAPE);
}
@@ -243,7 +243,7 @@ public class StrSubstitutor {
* @param escape the escape character
* @throws IllegalArgumentException if the prefix or suffix is null
*/
- public <V> StrSubstitutor(Map<String, V> valueMap, String prefix, String suffix, char escape) {
+ public <V> StrSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix, final char escape) {
this(StrLookup.mapLookup(valueMap), prefix, suffix, escape);
}
@@ -252,7 +252,7 @@ public class StrSubstitutor {
*
* @param variableResolver the variable resolver, may be null
*/
- public StrSubstitutor(StrLookup<?> variableResolver) {
+ public StrSubstitutor(final StrLookup<?> variableResolver) {
this(variableResolver, DEFAULT_PREFIX, DEFAULT_SUFFIX, DEFAULT_ESCAPE);
}
@@ -265,7 +265,7 @@ public class StrSubstitutor {
* @param escape the escape character
* @throws IllegalArgumentException if the prefix or suffix is null
*/
- public StrSubstitutor(StrLookup<?> variableResolver, String prefix, String suffix, char escape) {
+ public StrSubstitutor(final StrLookup<?> variableResolver, final String prefix, final String suffix, final char escape) {
this.setVariableResolver(variableResolver);
this.setVariablePrefix(prefix);
this.setVariableSuffix(suffix);
@@ -282,7 +282,7 @@ public class StrSubstitutor {
* @throws IllegalArgumentException if the prefix or suffix is null
*/
public StrSubstitutor(
- StrLookup<?> variableResolver, StrMatcher prefixMatcher, StrMatcher suffixMatcher, char escape) {
+ final StrLookup<?> variableResolver, final StrMatcher prefixMatcher, final StrMatcher suffixMatcher, final char escape) {
this.setVariableResolver(variableResolver);
this.setVariablePrefixMatcher(prefixMatcher);
this.setVariableSuffixMatcher(suffixMatcher);
@@ -297,7 +297,7 @@ public class StrSubstitutor {
* @param source the string to replace in, null returns null
* @return the result of the replace operation
*/
- public String replace(String source) {
+ public String replace(final String source) {
if (source == null) {
return null;
}
@@ -320,7 +320,7 @@ public class StrSubstitutor {
* @param length the length within the array to be processed, must be valid
* @return the result of the replace operation
*/
- public String replace(String source, int offset, int length) {
+ public String replace(final String source, final int offset, final int length) {
if (source == null) {
return null;
}
@@ -340,7 +340,7 @@ public class StrSubstitutor {
* @param source the character array to replace in, not altered, null returns null
* @return the result of the replace operation
*/
- public String replace(char[] source) {
+ public String replace(final char[] source) {
if (source == null) {
return null;
}
@@ -362,7 +362,7 @@ public class StrSubstitutor {
* @param length the length within the array to be processed, must be valid
* @return the result of the replace operation
*/
- public String replace(char[] source, int offset, int length) {
+ public String replace(final char[] source, final int offset, final int length) {
if (source == null) {
return null;
}
@@ -380,7 +380,7 @@ public class StrSubstitutor {
* @param source the buffer to use as a template, not changed, null returns null
* @return the result of the replace operation
*/
- public String replace(StringBuffer source) {
+ public String replace(final StringBuffer source) {
if (source == null) {
return null;
}
@@ -402,7 +402,7 @@ public class StrSubstitutor {
* @param length the length within the array to be processed, must be valid
* @return the result of the replace operation
*/
- public String replace(StringBuffer source, int offset, int length) {
+ public String replace(final StringBuffer source, final int offset, final int length) {
if (source == null) {
return null;
}
@@ -420,7 +420,7 @@ public class StrSubstitutor {
* @param source the builder to use as a template, not changed, null returns null
* @return the result of the replace operation
*/
- public String replace(StrBuilder source) {
+ public String replace(final StrBuilder source) {
if (source == null) {
return null;
}
@@ -442,7 +442,7 @@ public class StrSubstitutor {
* @param length the length within the array to be processed, must be valid
* @return the result of the replace operation
*/
- public String replace(StrBuilder source, int offset, int length) {
+ public String replace(final StrBuilder source, final int offset, final int length) {
if (source == null) {
return null;
}
@@ -460,7 +460,7 @@ public class StrSubstitutor {
* @param source the source to replace in, null returns null
* @return the result of the replace operation
*/
- public String replace(Object source) {
+ public String replace(final Object source) {
if (source == null) {
return null;
}
@@ -478,7 +478,7 @@ public class StrSubstitutor {
* @param source the buffer to replace in, updated, null returns zero
* @return true if altered
*/
- public boolean replaceIn(StringBuffer source) {
+ public boolean replaceIn(final StringBuffer source) {
if (source == null) {
return false;
}
@@ -498,7 +498,7 @@ public class StrSubstitutor {
* @param length the length within the buffer to be processed, must be valid
* @return true if altered
*/
- public boolean replaceIn(StringBuffer source, int offset, int length) {
+ public boolean replaceIn(final StringBuffer source, final int offset, final int length) {
if (source == null) {
return false;
}
@@ -518,7 +518,7 @@ public class StrSubstitutor {
* @param source the builder to replace in, updated, null returns zero
* @return true if altered
*/
- public boolean replaceIn(StrBuilder source) {
+ public boolean replaceIn(final StrBuilder source) {
if (source == null) {
return false;
}
@@ -537,7 +537,7 @@ public class StrSubstitutor {
* @param length the length within the builder to be processed, must be valid
* @return true if altered
*/
- public boolean replaceIn(StrBuilder source, int offset, int length) {
+ public boolean replaceIn(final StrBuilder source, final int offset, final int length) {
if (source == null) {
return false;
}
@@ -559,7 +559,7 @@ public class StrSubstitutor {
* @param length the length within the builder to be processed, must be valid
* @return true if altered
*/
- protected boolean substitute(StrBuilder buf, int offset, int length) {
+ protected boolean substitute(final StrBuilder buf, final int offset, final int length) {
return substitute(buf, offset, length, null) > 0;
}
@@ -575,7 +575,7 @@ public class StrSubstitutor {
* @return the length change that occurs, unless priorVariables is null when the int
* represents a boolean flag as to whether any change occurred.
*/
- private int substitute(StrBuilder buf, int offset, int length, List<String> priorVariables) {
+ private int substitute(final StrBuilder buf, final int offset, final int length, List<String> priorVariables) {
StrMatcher prefixMatcher = getVariablePrefixMatcher();
StrMatcher suffixMatcher = getVariableSuffixMatcher();
char escape = getEscapeChar();
@@ -689,7 +689,7 @@ public class StrSubstitutor {
* @param varName the variable name to check
* @param priorVariables the list of prior variables
*/
- private void checkCyclicSubstitution(String varName, List<String> priorVariables) {
+ private void checkCyclicSubstitution(final String varName, final List<String> priorVariables) {
if (priorVariables.contains(varName) == false) {
return;
}
@@ -718,7 +718,7 @@ public class StrSubstitutor {
* @param endPos the end position of the variable including the suffix, valid
* @return the variable's value or <b>null</b> if the variable is unknown
*/
- protected String resolveVariable(String variableName, StrBuilder buf, int startPos, int endPos) {
+ protected String resolveVariable(final String variableName, final StrBuilder buf, final int startPos, final int endPos) {
StrLookup<?> resolver = getVariableResolver();
if (resolver == null) {
return null;
@@ -744,7 +744,7 @@ public class StrSubstitutor {
*
* @param escapeCharacter the escape character (0 for disabling escaping)
*/
- public void setEscapeChar(char escapeCharacter) {
+ public void setEscapeChar(final char escapeCharacter) {
this.escapeChar = escapeCharacter;
}
@@ -774,7 +774,7 @@ public class StrSubstitutor {
* @return this, to enable chaining
* @throws IllegalArgumentException if the prefix matcher is null
*/
- public StrSubstitutor setVariablePrefixMatcher(StrMatcher prefixMatcher) {
+ public StrSubstitutor setVariablePrefixMatcher(final StrMatcher prefixMatcher) {
if (prefixMatcher == null) {
throw new IllegalArgumentException("Variable prefix matcher must not be null!");
}
@@ -792,7 +792,7 @@ public class StrSubstitutor {
* @param prefix the prefix character to use
* @return this, to enable chaining
*/
- public StrSubstitutor setVariablePrefix(char prefix) {
+ public StrSubstitutor setVariablePrefix(final char prefix) {
return setVariablePrefixMatcher(StrMatcher.charMatcher(prefix));
}
@@ -806,7 +806,7 @@ public class StrSubstitutor {
* @return this, to enable chaining
* @throws IllegalArgumentException if the prefix is null
*/
- public StrSubstitutor setVariablePrefix(String prefix) {
+ public StrSubstitutor setVariablePrefix(final String prefix) {
if (prefix == null) {
throw new IllegalArgumentException("Variable prefix must not be null!");
}
@@ -839,7 +839,7 @@ public class StrSubstitutor {
* @return this, to enable chaining
* @throws IllegalArgumentException if the suffix matcher is null
*/
- public StrSubstitutor setVariableSuffixMatcher(StrMatcher suffixMatcher) {
+ public StrSubstitutor setVariableSuffixMatcher(final StrMatcher suffixMatcher) {
if (suffixMatcher == null) {
throw new IllegalArgumentException("Variable suffix matcher must not be null!");
}
@@ -857,7 +857,7 @@ public class StrSubstitutor {
* @param suffix the suffix character to use
* @return this, to enable chaining
*/
- public StrSubstitutor setVariableSuffix(char suffix) {
+ public StrSubstitutor setVariableSuffix(final char suffix) {
return setVariableSuffixMatcher(StrMatcher.charMatcher(suffix));
}
@@ -871,7 +871,7 @@ public class StrSubstitutor {
* @return this, to enable chaining
* @throws IllegalArgumentException if the suffix is null
*/
- public StrSubstitutor setVariableSuffix(String suffix) {
+ public StrSubstitutor setVariableSuffix(final String suffix) {
if (suffix == null) {
throw new IllegalArgumentException("Variable suffix must not be null!");
}
@@ -894,7 +894,7 @@ public class StrSubstitutor {
*
* @param variableResolver the VariableResolver
*/
- public void setVariableResolver(StrLookup<?> variableResolver) {
+ public void setVariableResolver(final StrLookup<?> variableResolver) {
this.variableResolver = variableResolver;
}
@@ -920,7 +920,7 @@ public class StrSubstitutor {
* @since 3.0
*/
public void setEnableSubstitutionInVariables(
- boolean enableSubstitutionInVariables) {
+ final boolean enableSubstitutionInVariables) {
this.enableSubstitutionInVariables = enableSubstitutionInVariables;
}
}
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java Tue Jan 22 07:07:42 2013
@@ -161,7 +161,7 @@ public class StrTokenizer implements Lis
* @param input the text to parse
* @return a new tokenizer instance which parses Comma Separated Value strings
*/
- public static StrTokenizer getCSVInstance(String input) {
+ public static StrTokenizer getCSVInstance(final String input) {
StrTokenizer tok = getCSVClone();
tok.reset(input);
return tok;
@@ -176,7 +176,7 @@ public class StrTokenizer implements Lis
* @param input the text to parse
* @return a new tokenizer instance which parses Comma Separated Value strings
*/
- public static StrTokenizer getCSVInstance(char[] input) {
+ public static StrTokenizer getCSVInstance(final char[] input) {
StrTokenizer tok = getCSVClone();
tok.reset(input);
return tok;
@@ -211,7 +211,7 @@ public class StrTokenizer implements Lis
* @param input the string to parse
* @return a new tokenizer instance which parses Tab Separated Value strings.
*/
- public static StrTokenizer getTSVInstance(String input) {
+ public static StrTokenizer getTSVInstance(final String input) {
StrTokenizer tok = getTSVClone();
tok.reset(input);
return tok;
@@ -224,7 +224,7 @@ public class StrTokenizer implements Lis
* @param input the string to parse
* @return a new tokenizer instance which parses Tab Separated Value strings.
*/
- public static StrTokenizer getTSVInstance(char[] input) {
+ public static StrTokenizer getTSVInstance(final char[] input) {
StrTokenizer tok = getTSVClone();
tok.reset(input);
return tok;
@@ -248,7 +248,7 @@ public class StrTokenizer implements Lis
*
* @param input the string which is to be parsed
*/
- public StrTokenizer(String input) {
+ public StrTokenizer(final String input) {
super();
if (input != null) {
chars = input.toCharArray();
@@ -263,7 +263,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed
* @param delim the field delimiter character
*/
- public StrTokenizer(String input, char delim) {
+ public StrTokenizer(final String input, final char delim) {
this(input);
setDelimiterChar(delim);
}
@@ -274,7 +274,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed
* @param delim the field delimiter string
*/
- public StrTokenizer(String input, String delim) {
+ public StrTokenizer(final String input, final String delim) {
this(input);
setDelimiterString(delim);
}
@@ -285,7 +285,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed
* @param delim the field delimiter matcher
*/
- public StrTokenizer(String input, StrMatcher delim) {
+ public StrTokenizer(final String input, final StrMatcher delim) {
this(input);
setDelimiterMatcher(delim);
}
@@ -298,7 +298,7 @@ public class StrTokenizer implements Lis
* @param delim the field delimiter character
* @param quote the field quoted string character
*/
- public StrTokenizer(String input, char delim, char quote) {
+ public StrTokenizer(final String input, final char delim, final char quote) {
this(input, delim);
setQuoteChar(quote);
}
@@ -311,7 +311,7 @@ public class StrTokenizer implements Lis
* @param delim the field delimiter matcher
* @param quote the field quoted string matcher
*/
- public StrTokenizer(String input, StrMatcher delim, StrMatcher quote) {
+ public StrTokenizer(final String input, final StrMatcher delim, final StrMatcher quote) {
this(input, delim);
setQuoteMatcher(quote);
}
@@ -322,7 +322,7 @@ public class StrTokenizer implements Lis
*
* @param input the string which is to be parsed, not cloned
*/
- public StrTokenizer(char[] input) {
+ public StrTokenizer(final char[] input) {
super();
this.chars = ArrayUtils.clone(input);
}
@@ -333,7 +333,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed, not cloned
* @param delim the field delimiter character
*/
- public StrTokenizer(char[] input, char delim) {
+ public StrTokenizer(final char[] input, final char delim) {
this(input);
setDelimiterChar(delim);
}
@@ -344,7 +344,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed, not cloned
* @param delim the field delimiter string
*/
- public StrTokenizer(char[] input, String delim) {
+ public StrTokenizer(final char[] input, final String delim) {
this(input);
setDelimiterString(delim);
}
@@ -355,7 +355,7 @@ public class StrTokenizer implements Lis
* @param input the string which is to be parsed, not cloned
* @param delim the field delimiter matcher
*/
- public StrTokenizer(char[] input, StrMatcher delim) {
+ public StrTokenizer(final char[] input, final StrMatcher delim) {
this(input);
setDelimiterMatcher(delim);
}
@@ -368,7 +368,7 @@ public class StrTokenizer implements Lis
* @param delim the field delimiter character
* @param quote the field quoted string character
*/
- public StrTokenizer(char[] input, char delim, char quote) {
+ public StrTokenizer(final char[] input, final char delim, final char quote) {
this(input, delim);
setQuoteChar(quote);
}
@@ -381,7 +381,7 @@ public class StrTokenizer implements Lis
* @param delim the field delimiter character
* @param quote the field quoted string character
*/
- public StrTokenizer(char[] input, StrMatcher delim, StrMatcher quote) {
+ public StrTokenizer(final char[] input, final StrMatcher delim, final StrMatcher quote) {
this(input, delim);
setQuoteMatcher(quote);
}
@@ -469,7 +469,7 @@ public class StrTokenizer implements Lis
* @param input the new string to tokenize, null sets no text to parse
* @return this, to enable chaining
*/
- public StrTokenizer reset(String input) {
+ public StrTokenizer reset(final String input) {
reset();
if (input != null) {
this.chars = input.toCharArray();
@@ -487,7 +487,7 @@ public class StrTokenizer implements Lis
* @param input the new character array to tokenize, not cloned, null sets no text to parse
* @return this, to enable chaining
*/
- public StrTokenizer reset(char[] input) {
+ public StrTokenizer reset(final char[] input) {
reset();
this.chars = ArrayUtils.clone(input);
return this;
@@ -580,7 +580,7 @@ public class StrTokenizer implements Lis
* @throws UnsupportedOperationException always
*/
@Override
- public void set(String obj) {
+ public void set(final String obj) {
throw new UnsupportedOperationException("set() is unsupported");
}
@@ -590,7 +590,7 @@ public class StrTokenizer implements Lis
* @throws UnsupportedOperationException always
*/
@Override
- public void add(String obj) {
+ public void add(final String obj) {
throw new UnsupportedOperationException("add() is unsupported");
}
@@ -632,7 +632,7 @@ public class StrTokenizer implements Lis
* @param count the number of characters to tokenize, must be valid
* @return the modifiable list of String tokens, unmodifiable if null array or zero count
*/
- protected List<String> tokenize(char[] chars, int offset, int count) {
+ protected List<String> tokenize(final char[] chars, final int offset, final int count) {
if (chars == null || count == 0) {
return Collections.emptyList();
}
@@ -659,7 +659,7 @@ public class StrTokenizer implements Lis
* @param list the list to add to
* @param tok the token to add
*/
- private void addToken(List<String> list, String tok) {
+ private void addToken(final List<String> list, String tok) {
if (StringUtils.isEmpty(tok)) {
if (isIgnoreEmptyTokens()) {
return;
@@ -682,7 +682,7 @@ public class StrTokenizer implements Lis
* @return the starting position of the next field (the character
* immediately after the delimiter), or -1 if end of string found
*/
- private int readNextToken(char[] chars, int start, int len, StrBuilder workArea, List<String> tokens) {
+ private int readNextToken(final char[] chars, int start, final int len, final StrBuilder workArea, final List<String> tokens) {
// skip all leading whitespace, unless it is the
// field delimiter or the quote character
while (start < len) {
@@ -732,8 +732,8 @@ public class StrTokenizer implements Lis
* immediately after the delimiter, or if end of string found,
* then the length of string
*/
- private int readWithQuotes(char[] chars, int start, int len, StrBuilder workArea,
- List<String> tokens, int quoteStart, int quoteLen) {
+ private int readWithQuotes(final char[] chars, final int start, final int len, final StrBuilder workArea,
+ final List<String> tokens, final int quoteStart, final int quoteLen) {
// Loop until we've found the end of the quoted
// string or the end of the input
workArea.clear();
@@ -828,7 +828,7 @@ public class StrTokenizer implements Lis
* @param quoteLen the length of the matched quote, 0 if no quoting
* @return true if a quote is matched
*/
- private boolean isQuote(char[] chars, int pos, int len, int quoteStart, int quoteLen) {
+ private boolean isQuote(final char[] chars, final int pos, final int len, final int quoteStart, final int quoteLen) {
for (int i = 0; i < quoteLen; i++) {
if (pos + i >= len || chars[pos + i] != chars[quoteStart + i]) {
return false;
@@ -856,7 +856,7 @@ public class StrTokenizer implements Lis
* @param delim the delimiter matcher to use
* @return this, to enable chaining
*/
- public StrTokenizer setDelimiterMatcher(StrMatcher delim) {
+ public StrTokenizer setDelimiterMatcher(final StrMatcher delim) {
if (delim == null) {
this.delimMatcher = StrMatcher.noneMatcher();
} else {
@@ -871,7 +871,7 @@ public class StrTokenizer implements Lis
* @param delim the delimiter character to use
* @return this, to enable chaining
*/
- public StrTokenizer setDelimiterChar(char delim) {
+ public StrTokenizer setDelimiterChar(final char delim) {
return setDelimiterMatcher(StrMatcher.charMatcher(delim));
}
@@ -881,7 +881,7 @@ public class StrTokenizer implements Lis
* @param delim the delimiter string to use
* @return this, to enable chaining
*/
- public StrTokenizer setDelimiterString(String delim) {
+ public StrTokenizer setDelimiterString(final String delim) {
return setDelimiterMatcher(StrMatcher.stringMatcher(delim));
}
@@ -909,7 +909,7 @@ public class StrTokenizer implements Lis
* @param quote the quote matcher to use, null ignored
* @return this, to enable chaining
*/
- public StrTokenizer setQuoteMatcher(StrMatcher quote) {
+ public StrTokenizer setQuoteMatcher(final StrMatcher quote) {
if (quote != null) {
this.quoteMatcher = quote;
}
@@ -925,7 +925,7 @@ public class StrTokenizer implements Lis
* @param quote the quote character to use
* @return this, to enable chaining
*/
- public StrTokenizer setQuoteChar(char quote) {
+ public StrTokenizer setQuoteChar(final char quote) {
return setQuoteMatcher(StrMatcher.charMatcher(quote));
}
@@ -953,7 +953,7 @@ public class StrTokenizer implements Lis
* @param ignored the ignored matcher to use, null ignored
* @return this, to enable chaining
*/
- public StrTokenizer setIgnoredMatcher(StrMatcher ignored) {
+ public StrTokenizer setIgnoredMatcher(final StrMatcher ignored) {
if (ignored != null) {
this.ignoredMatcher = ignored;
}
@@ -969,7 +969,7 @@ public class StrTokenizer implements Lis
* @param ignored the ignored character to use
* @return this, to enable chaining
*/
- public StrTokenizer setIgnoredChar(char ignored) {
+ public StrTokenizer setIgnoredChar(final char ignored) {
return setIgnoredMatcher(StrMatcher.charMatcher(ignored));
}
@@ -997,7 +997,7 @@ public class StrTokenizer implements Lis
* @param trimmer the trimmer matcher to use, null ignored
* @return this, to enable chaining
*/
- public StrTokenizer setTrimmerMatcher(StrMatcher trimmer) {
+ public StrTokenizer setTrimmerMatcher(final StrMatcher trimmer) {
if (trimmer != null) {
this.trimmerMatcher = trimmer;
}
@@ -1022,7 +1022,7 @@ public class StrTokenizer implements Lis
* @param emptyAsNull whether empty tokens are returned as null
* @return this, to enable chaining
*/
- public StrTokenizer setEmptyTokenAsNull(boolean emptyAsNull) {
+ public StrTokenizer setEmptyTokenAsNull(final boolean emptyAsNull) {
this.emptyAsNull = emptyAsNull;
return this;
}
@@ -1045,7 +1045,7 @@ public class StrTokenizer implements Lis
* @param ignoreEmptyTokens whether empty tokens are not returned
* @return this, to enable chaining
*/
- public StrTokenizer setIgnoreEmptyTokens(boolean ignoreEmptyTokens) {
+ public StrTokenizer setIgnoreEmptyTokens(final boolean ignoreEmptyTokens) {
this.ignoreEmptyTokens = ignoreEmptyTokens;
return this;
}