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

Added basic append method for many types.

parent 9154acbf
...@@ -105,6 +105,54 @@ public class StringList extends ArrayList<String> implements CharSequence ...@@ -105,6 +105,54 @@ public class StringList extends ArrayList<String> implements CharSequence
} }
} }
/**
* Appends the string of the array argument to this boolean list.
*
* @param strings
* @return
*/
public StringList append(final boolean... items)
{
StringList result;
if (items != null)
{
for (boolean item : items)
{
this.append(item);
}
}
result = this;
//
return result;
}
/**
* Appends the string of the array argument to this byte list.
*
* @param strings
* @return
*/
public StringList append(final byte... items)
{
StringList result;
if (items != null)
{
for (byte item : items)
{
this.append(item);
}
}
result = this;
//
return result;
}
/** /**
* Appends the string representation of the char argument to this string * Appends the string representation of the char argument to this string
* list. * list.
...@@ -124,6 +172,30 @@ public class StringList extends ArrayList<String> implements CharSequence ...@@ -124,6 +172,30 @@ public class StringList extends ArrayList<String> implements CharSequence
return result; return result;
} }
/**
* Appends the string of the array argument to this char list.
*
* @param strings
* @return
*/
public StringList append(final char... items)
{
StringList result;
if (items != null)
{
for (char item : items)
{
this.append(item);
}
}
result = this;
//
return result;
}
/** /**
* Appends the string of the specified collection, in the order they are * Appends the string of the specified collection, in the order they are
* returned by the collection's iterator. * returned by the collection's iterator.
...@@ -222,6 +294,30 @@ public class StringList extends ArrayList<String> implements CharSequence ...@@ -222,6 +294,30 @@ public class StringList extends ArrayList<String> implements CharSequence
return result; return result;
} }
/**
* Appends the string of the array argument to this short list.
*
* @param strings
* @return
*/
public StringList append(final short... items)
{
StringList result;
if (items != null)
{
for (short item : items)
{
this.append(item);
}
}
result = this;
//
return result;
}
/** /**
* Appends the string representation of the long argument to this string * Appends the string representation of the long argument to this string
* list. * list.
...@@ -303,6 +399,60 @@ public class StringList extends ArrayList<String> implements CharSequence ...@@ -303,6 +399,60 @@ public class StringList extends ArrayList<String> implements CharSequence
return result; return result;
} }
/**
* Appends the string of the array argument to this boolean list.
*
* @param items
* @return
*/
public StringList appendln(final boolean... items)
{
StringList result;
append(items).appendln();
result = this;
//
return result;
}
/**
* Appends the string of the array argument to this byte list.
*
* @param items
* @return
*/
public StringList appendln(final byte... items)
{
StringList result;
append(items).appendln();
result = this;
//
return result;
}
/**
* Appends the string of the array argument to this char list.
*
* @param strings
* @return
*/
public StringList appendln(final char... items)
{
StringList result;
append(items).appendln();
result = this;
//
return result;
}
/** /**
* Appends the string representation of the char argument to this string * Appends the string representation of the char argument to this string
* list, then append a break line too. * list, then append a break line too.
...@@ -405,6 +555,24 @@ public class StringList extends ArrayList<String> implements CharSequence ...@@ -405,6 +555,24 @@ public class StringList extends ArrayList<String> implements CharSequence
return result; return result;
} }
/**
* Appends the string of the array argument to this short list.
*
* @param strings
* @return
*/
public StringList appendln(final short... items)
{
StringList result;
append(items).appendln();
result = this;
//
return result;
}
/** /**
* Appendln. * Appendln.
* *
......
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