Improve toString performance.

This commit is contained in:
Christian P. MOMON 2014-06-08 16:37:30 +02:00
parent ca060e2c79
commit 23516c108a

View file

@ -709,6 +709,15 @@ public class StringList extends ArrayList<String> implements CharSequence
{
String result;
if (size() == 1)
{
//
result = get(0);
}
else
{
//
StringBuffer buffer = new StringBuffer(length());
for (String string : this)
@ -717,6 +726,7 @@ public class StringList extends ArrayList<String> implements CharSequence
}
result = buffer.toString();
}
//
return (result);