Commit fc2d92c2 authored by Christian P. MOMON's avatar Christian P. MOMON
Browse files

Set StringList Appendable.

parent 0df57332
......@@ -18,6 +18,7 @@
*/
package fr.devinsy.util.strings;
import java.io.IOException;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collection;
......@@ -34,7 +35,7 @@ import org.apache.commons.lang3.StringUtils;
* concatenation action.
*
*/
public class StringList extends ArrayList<String> implements CharSequence
public class StringList extends ArrayList<String> implements CharSequence, Appendable
{
private static final long serialVersionUID = -1154185934830213732L;
......@@ -152,6 +153,7 @@ public class StringList extends ArrayList<String> implements CharSequence
* @param character
* @return
*/
@Override
public StringList append(final char character)
{
StringList result;
......@@ -164,6 +166,44 @@ public class StringList extends ArrayList<String> implements CharSequence
return result;
}
/* (non-Javadoc)
* @see java.lang.Appendable#append(java.lang.CharSequence)
*/
@Override
public StringList append(final CharSequence charSequence) throws IOException
{
StringList result;
if (charSequence != null)
{
this.append(charSequence.toString());
}
result = this;
//
return result;
}
/* (non-Javadoc)
* @see java.lang.Appendable#append(java.lang.CharSequence, int, int)
*/
@Override
public StringList append(final CharSequence charSequence, final int start, final int end) throws IOException
{
StringList result;
if (charSequence != null)
{
this.append(charSequence.subSequence(start, end).toString());
}
result = this;
//
return result;
}
/**
* Appends the string of the specified collection, in the order they are
* returned by the collection's iterator.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment